diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index 1efe4f4bb82..1ece034ae94 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ Thumbs.db htdocs/includes/autoload.php htdocs/includes/bin/ htdocs/includes/composer/ +/.pydevproject diff --git a/.travis.yml b/.travis.yml index b3e57791fc8..51b62e240e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ # For syntax, see http://about.travis-ci.org/docs/user/languages/php/ # We use dist: precise to have php 5.3 available -dist: precise +dist: trusty sudo: required language: php @@ -31,7 +31,6 @@ addons: - pgloader php: -- '5.3' - '5.4' - '5.5' - '5.6' @@ -64,8 +63,6 @@ matrix: - php: nightly # We exclude some combinations not usefull to save Travis CPU exclude: - - php: '5.4' - env: DB=postgresql - php: '5.5' env: DB=postgresql - php: '5.6' @@ -123,7 +120,7 @@ install: - | echo "Installing PHP Unit" - if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then + if [ "$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" = '7.1' ]; then @@ -143,137 +140,143 @@ install: echo "Adding path of binaries tools installed by composer to the PATH" export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" echo - + + before_script: -- | - echo Start travis - echo Current dir is `pwd` - echo Home dir is `echo ~` - echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR + - | + 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 "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit" + phpenv config-add /tmp/xdebug.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, 7.1, 7.2 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" + - | + 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.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, 7.1, 7.2 and nightly! + echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + fi + phpenv rehash + echo + + - | + echo "Versions information" # Check PHP - php -i + echo "PHP version" + php -i | head - # Check PHP CodeSniffer installation + echo "PHPCS version" which phpcs - phpcs --version - phpcs -i + phpcs --version | head - + phpcs -i | head - # Check PHPUnit installation + echo "PHPUnit version" which phpunit - phpunit --version - # Check MySQL - mysql --version - mysql -e "SELECT VERSION();" + phpunit --version | head - + # Check Apache version + echo "Apache version" + apache2 -v | head - + # Check MariaDb + echo "MariaDb version" + mysql --version | head - + mysql -e "SELECT VERSION();" | head - echo - fi -- | - echo "Setting up database" - if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then - echo "MySQL" - mysql -e 'DROP DATABASE IF EXISTS travis;' - mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' - mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' - mysql -e 'FLUSH PRIVILEGES;' - mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - fi - if [ "$DB" = 'postgresql' ]; then - #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr - pgloader mysql://root@127.0.0.1/travis postgresql:///travis - fi - # TODO: SQLite - echo + - | + echo "Setting up database" + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then + echo "MySQL" + mysql -e 'DROP DATABASE IF EXISTS travis;' + mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' + mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' + mysql -e 'FLUSH PRIVILEGES;' + mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + fi + if [ "$DB" = 'postgresql' ]; then + #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr + pgloader mysql://root@127.0.0.1/travis postgresql:///travis + 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 - 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 + - | + 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 + 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 "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" + + - echo "Setting up Apache + FPM" + - sudo apt-get update + - sudo apt-get install apache2 libapache2-mod-fastcgi # 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" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$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 + - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf + - | + if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + # Copy the included pool + sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf + fi + - sudo a2enmod rewrite actions fastcgi alias + - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars + - sudo chown -R travis:travis /var/lib/apache2/fastcgi + - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm + # configure apache virtual hosts for precise + #- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default + #- sudo cat /etc/apache2/sites-available/default + # configure apache virtual hosts for trusty + - sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf + - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf + - sudo cat /etc/apache2/sites-available/000-default.conf + - sudo service apache2 restart + + script: - | - echo "Checking webserver availability" + echo "Checking webserver availability by a wget -O - http://127.0.0.1" # Ensure we catch errors set -e - wget http://127.0.0.1 - if [ "$DEBUG" = true ]; then - cat index.html - fi + # The wget should return a page with line ' + wget -O - http://127.0.0.1 > test.html + head test.html set +e echo @@ -290,7 +293,8 @@ script: # 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/setup/codesniffer/ruleset.xml --encoding=utf-8 . + #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . + phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . set +e echo @@ -328,7 +332,7 @@ script: php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log - php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log + php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.log php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log cd - set +e @@ -341,7 +345,6 @@ script: - | echo "Unit testing" - phpunit --version # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file. set -e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php diff --git a/.tx/config b/.tx/config index 89d123b0362..db380163540 100644 --- a/.tx/config +++ b/.tx/config @@ -20,6 +20,12 @@ source_file = htdocs/langs/en_US/agenda.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.assets] +file_filter = htdocs/langs//assets.lang +source_file = htdocs/langs/en_US/assets.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.banks] file_filter = htdocs/langs//banks.lang source_file = htdocs/langs/en_US/banks.lang @@ -152,12 +158,6 @@ 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 -source_lang = en_US -type = MOZILLAPROPERTIES - [dolibarr.install] file_filter = htdocs/langs//install.lang source_file = htdocs/langs/en_US/install.lang @@ -356,6 +356,12 @@ source_file = htdocs/langs/en_US/supplier_proposal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.ticket] +file_filter = htdocs/langs//ticket.lang +source_file = htdocs/langs/en_US/ticket.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.trips] file_filter = htdocs/langs//trips.lang source_file = htdocs/langs/en_US/trips.lang diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9a84fdbbda0 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,84 @@ +# Code of Conduct + +## 1. Purpose + +A primary goal of Dolibarr is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). + +This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. + +We invite all those who participate in Dolibarr to help us create safe and positive experiences for everyone. + +## 2. Open Source Citizenship + +A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. + +Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. + +If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. + +## 3. Expected Behavior + +The following behaviors are expected and requested of all community members: + +* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. +* Exercise consideration and respect in your speech and actions. +* Attempt collaboration before conflict. +* Refrain from demeaning, discriminatory, or harassing behavior and speech. +* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. +* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. + +## 4. Unacceptable Behavior + +The following behaviors are considered harassment and are unacceptable within our community: + +* Violence, threats of violence or violent language directed against another person. +* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. +* Posting or displaying sexually explicit or violent material. +* Posting or threatening to post other people’s personally identifying information ("doxing"). +* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. +* Inappropriate photography or recording. +* Inappropriate physical contact. You should have someone’s consent before touching them. +* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. +* Deliberate intimidation, stalking or following (online or in person). +* Advocating for, or encouraging, any of the above behavior. +* Sustained disruption of community events, including talks and presentations. + +## 5. Consequences of Unacceptable Behavior + +Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. + +Anyone asked to stop unacceptable behavior is expected to comply immediately. + +If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event). + +## 6. Reporting Guidelines + +If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. contact@dolibarr.org. + + + +Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. + +## 7. Addressing Grievances + +If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Dolibarr with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. + + + +## 8. Scope + +We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business. + +This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members. + +## 9. Contact info + +contact@dolibarr.org + +## 10. License and attribution + +This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). + +Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). + +Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/) diff --git a/ChangeLog b/ChangeLog index 5aff4d6d3ba..410e49eaf4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,13 +8,179 @@ English Dolibarr ChangeLog WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* Remove old deprecated hook 'insertExtraFields'. Triggers must be used for action on CRUD events. * Hook 'maildao' was renamed into 'mail' into the method sendfile that send emails, and method was renamed from 'doaction' into 'sendMail'. * Rename trigger CONTRACT_SERVICE_ACTIVATE into LINECONTRACT_ACTIVATE and CONTRACT_SERVICE_CLOSE into LINECONTRACT_CLOSE * Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is a duplicated feature. Cloning is not a business event, the business event is CREATE, so no trigger required. - +* PHP 5.3 is no more supported. Minimum PHP is now 5.4+ +* Remove the old deprecated code of doActions and getInstanceDao in canvas. The doActions of standard hooks are + already available and are better. +* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better. +* The hook contaxt commcard has been renamed thirdpartycomm +* The hook contaxt thirdpartycard has been renamed thirdpartycontact +* Remove method Categorie:get_nb_categories() that was not used. + + + +***** ChangeLog for 7.0.2 compared to 7.0.1 ***** +FIX: #8023 +FIX: #8259 can't update contact birthday with REST API +FIX: #8359 +FIX: #8389 +FIX: #8478 !empty instead of count to avoid warning +FIX: #8488 +FIX: #8559 Bug to generate cheque receipt +FIX: #8571 +FIX: #8574 +FIX: #8580 +FIX: #8650 +FIX: actioncomm export: type filtering not working +FIX: Add a test to avoid to reset binding by error. +FIX: addline on invoice supplier manage rank on its own if not provided +FIX: Add warning when expense report line not into range +FIX: avoid Error: Call to undefined method mysqli::get_charset() +FIX: avoid focus problem when select2 is in a modal dialog window +FIX: Binding pages must start on fiscal month not calendar month +FIX: button "Classify bill" on supplier order was not visible +FIX: Button receive products not visible +FIX: can bypass the CSRF protection with url with domain inside +FIX: Can't edit option PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY +FIX: commonobject: don't require notnull field if default set +FIX: CommonObject: don't require 'notnull' field if 'default' set +FIX: cron script disabled if module disabled +FIX: CVE-2018-10092 +FIX: CVE-2018-10094 +FIX: CVE-2018-10095 +FIX: CVE-2018-9019 +FIX: CWE-89 +FIX: Data on income/expense report was always 0 +FIX: default addupdatedelete actions: uniformize add/update value checks +FIX: default currency not set on supplier order creation from commercial menu #8459 +FIX: delete all product variants of a parent product +FIX: Detail per account not visible when total < 0 +FIX: DOL_AUTOSET_COOKIE was not correctly setting value of cookie +FIX: don't print empty date in CommonObject::showOutputField +FIX: dont print empty date in CommonObject::showOutputField +FIX: Draft invoice must be excluded from report +FIX: environment shown on cron card +FIX: Error in ContractLigne not return to Contract +FIX: extrafields price and double were lost during a failed post. +FIX: File name not visible in email preview +FIX: filter/sorting on extrafield on contact list from contact tab +FIX: Initial month on report income/expense per predefined group +FIX: issue #8037 +FIX: Issue #8455 +FIX: issue #8470 +FIX: label in getnomurl projectlist +FIX: limit access of email template page to internal users +FIX: look and feel v7 "back to" for bookkeeping record +FIX: Max nb of generation of recurring invoice should not show warning +FIX: missing english name for object +FIX: Missing include +FIX: missing User object with API REST +FIX: modulebuilder: could not create html fields +FIX: modulebuilder: handle 'price' fieldtype +FIX: multiple creation of same event +FIX: Name of user not visible on journalizing expense report payments +FIX: Not approved holidays must not be visible into timesheet +FIX: Only approved expense report must be journalized +FIX: payment term doc-specific label was not used +FIX: payment term doc-specific label was not used (issue #8414) +FIX: project category is type 6 not 5 +FIX: Projet is not prefilled when created from overwiew page +FIX: Related contact printed in societe agenda +FIX: Removed error when no error on accounting setup page +FIX: remove var_dump +FIX: sanitize setup params +FIX: selectForFormsList: entity checked even is object not multi-entity managed +FIX: service creation, right is tested regarding the product type +FIX: some localtaxes errors +FIX: Some report have data when several chart of accounts exists +FIX: sql error using no category +FIX: SQL Injection CWE-89 +FIX: Support or multicompany for sheduled jobs +FIX: Test on mandatory status when closing proposal failed +FIX: to allow IRPF not null even if main VAT is null. +FIX: update wrong datetime extrafield +FIX: Use priority to define order of sheduled jobs +FIX: various modulebuilder-related issues +FIX: view of balance before field +FIX: weird password autocompletion in Goocle Chrome (issue #8479) +FIX: weird password autocompletion in Google Chrome (issue #8479) +FIX: When clearing filter, we must not save tmp criterias in session +FIX: With x extrafields, request for multicompany label was done x times +FIX: several XSS +FIX: zip not filtered + +***** ChangeLog for 7.0.1 compared to 7.0.0 ***** +FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php +FIX: #8200 +FIX: #8219 +FIX: #8232 +FIX: #8269 +FIX: #8277 +FIX: #8285 Extrafields now reported by /api/index.php/agendaevents/{id} +FIX: #8289 add a configuration for stock calculation +FIX: Activate all also if there are inactive services +FIX: add planned delivery to order exports +FIX: approval date was not visible if leave was canceled after +FIX: avoid "Array" on screen +FIX: Avoid empty value to fk_multicurrency attribute +FIX: Bad var for substitution of free text +FIX: Can't activate tasks on projects configuration +FIX: Can use odx templates that does not include lines tags +FIX: check shipping on delete order +FIX: check verif exped on delete order +FIX: comment on tasks +FIX: country must not be mandatory for accounting report groups +FIX: css +FIX: Delete tasks on project delete will now trigger TASK_DELETE +FIX: Do not lose filter when editing comment of a time spent in task view +FIX: duplicate confirm message. Missing reposition class +FIX: Duplicate product_type asignement on order addline +FIX: email use the validate user instead of approver in holiday approval +FIX: Error management in leave request +FIX: for nondisplay of fk_element 's id in REST API response +FIX: Generic substitution of constant disabled for sensitive constant +FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back +FIX: Import process must stop after ending line nb to import +FIX: Infinite loop on deletion of temp file when there is symbolic links +FIX: Input of holiday for subordinates was ko +FIX: invoice creation fails when next date not defined +FIX: Label of event show twice +FIX: letter for month March +FIX: Look and feel v7 +FIX: Make a redirect after the remove_file action to avoid deletion done +FIX: migration script for product photo +FIX: missing email of customer in stripe info payments +FIX: missing object entity in fetch +FIX: Missing restore_lastsearch_values +FIX: multicompany compatibility and fix reports +FIX: natural search double quote +FIX: navigation and filters on holiday list +FIX: Parameter must be an array or an object that implements Countable +FIX: Payment mode not correctly set in donation and document +FIX: Permission in list of holiday +FIX: Properties updated if update successfull. +FIX: reverse field to have object loaded in doaction +FIX: Saving wrong localtax on order addline +FIX: Search criteria on vat +FIX: security report by DIGITEMIS CYBERSECURITY & PRIVACY +FIX: show status on societe banner +FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup +FIX: Subscription events not recorded into agenda +FIX: Subscription not correctly log in blockedlog +FIX: Temporary dir for mail files must be cleaned at beginning of form +FIX: Trad and creation date in subscription create +FIX: translation of holiday types +FIX: Unknown column 'pl.amount_requested' in compta/prelevement/factures.php +FIX: Useless clean of tree +FIX: Use of undefined constant _ROWS_2 +FIX: warning when adding ECM files using old photo path + ***** ChangeLog for 7.0.0 compared to 6.0.5 ***** For users: @@ -303,6 +469,56 @@ Following changes may create regressions for some external modules, but were nec multicompany module to a version that support Dolibarr v7, everything should work as expected. + +***** ChangeLog for 6.0.7 compared to 6.0.6 ***** +FIX: #8023 +FIX: #8259 can't update contact birthday with REST API +FIX: #8478 !empty instead of count to avoid warning +FIX: #8488 +FIX: actioncomm export: type filtering not working +FIX: addline on invoice supplier manage rank on its own if not provided +FIX: issue #8037 +FIX: label in getnomurl projectlist +FIX: payment term doc-specific label was not used +FIX: payment term doc-specific label was not used (issue #8414) +FIX: project category is type 6 not 5 !! +FIX: some localtaxes errors +FIX: weird password autocompletion in Google Chrome (issue #8479) + +***** ChangeLog for 6.0.6 compared to 6.0.5 ***** +FIX: #7974 Contract - Invalid reference on the document +FIX: #8139 +FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php +FIX: #8151 +FIX: #8200 +FIX: add planned delivery to order exports +FIX: a discount is a percent, not an amount, so we use vatrate not price +FIX: Avoid empty value to fk_multicurrency attribute +FIX: Bad localtaxes assignment in cashdesk +FIX: check shipping on delete order +FIX: check verif exped on delete order +FIX: creer into lire +FIX: Delete tasks on project delete will now trigger TASK_DELETE +FIX: Global on $user parameter reset the variable +FIX: if we make a mistake with situation_percent, now we can correct… +FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back +FIX: Import process must stop after ending line nb to import +FIX: migration script for product photo +FIX: natural search double quote +FIX: reverse field to have object loaded in doaction +FIX: Saving wrong localtax on order addline +FIX: show status on societe banner +FIX: solve column mismatch in user card's usergroup list + code cleanup +FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup +FIX: unset categorie +FIX: update_extras on fourn card +FIX: warning when adding ECM files using old photo path +FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page +NEW: Add sale representative einstein_pdf_modules +NEW_einstein_pdf_modules +NEW: field commerciaux and categ export CustomersInvoicesAndPayments + + ***** ChangeLog for 6.0.5 compared to 6.0.4 ***** FIX: security vulnerability reported by ADLab of Venustech CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900 diff --git a/README-FR.md b/README-FR.md index 8e6a2c5aac0..a9745bb8dbb 100644 --- a/README-FR.md +++ b/README-FR.md @@ -138,9 +138,10 @@ Voici un liste de fonctionnalites pas encore gérées par Dolibarr: Les documentations utilisateur, développeur et traducteur sont disponible sous forme de ressources de la communautés via la site [Wiki](https://wiki.dolibarr.org). -## CONTRIBUTING +## CONTRIBUER -Voir le fichier [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md) +Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. + ## CREDITS diff --git a/README.md b/README.md index 3d9ba75f1f5..b68e8b65558 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com). -## FUTURE +## WHAT DOLIBARR CAN'T DO YET These are features that Dolibarr does **not** yet fully support: @@ -179,7 +179,8 @@ Administrator, user, developer and translator's documentations are available alo ## CONTRIBUTING -See [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md) file +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. + ## CREDITS @@ -199,3 +200,8 @@ Follow Dolibarr project on: - [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [GitHub](https://github.com/Dolibarr/dolibarr) + + +### Sponsors + +Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)] diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 7dcb8c738bd..2d4668b447c 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -28,9 +28,9 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__ SourceDir=..\..\.. AppId=doliwamp AppPublisher=NLTechno -AppPublisherURL=http://www.nltechno.com -AppSupportURL=http://www.dolibarr.org -AppUpdatesURL=http://www.dolibarr.org +AppPublisherURL=https://www.nltechno.com +AppSupportURL=https://www.dolibarr.org +AppUpdatesURL=https://www.dolibarr.org AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares. AppCopyright=Copyright (C) 2008-2017 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) DefaultDirName=c:\dolibarr @@ -100,9 +100,9 @@ Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; F Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion; ; PhpMyAdmin, Apache, Php, Mysql ; Put here path of Wampserver applications -; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 +; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 ; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 -; Value ???: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) +; Value OK: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index e6336e30e97..0764d64b491 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -17,11 +17,13 @@ */ /** - * \file build/generate_filecheck_xml.php + * \file build/generate_filelist_xml.php * \ingroup dev * \brief This script create a xml checksum file */ +if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db + $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; @@ -45,7 +47,7 @@ $includeconstants=array(); if (empty($argv[1])) { - print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; exit -1; } @@ -68,21 +70,52 @@ while ($i < $argc) $i++; } +if (empty($release)) +{ + print "Error: Missing release paramater\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + exit -1; +} + +$savrelease = $release; + +// If release is auto, we take current version +$tmpver=explode('-', $release, 2); +if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') +{ + $release=DOL_VERSION; + if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1]; +} + if (empty($includecustom)) { - if (DOL_VERSION != $release) - { - print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n"; - print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n"; - exit -1; - } + $tmpverbis=explode('-', $release, 2); + if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') + { + if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') + { + print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + exit -1; + } + } + else + { + $tmpverter=explode('-', DOL_VERSION, 2); + if ($tmpverter[0] != $tmpverbis[0]) + { + print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + exit -1; + } + } } else { if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release)) { - print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n"; - print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n"; + print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; exit -1; } } diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 839a8092a7c..1ab3269d0de 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -388,7 +388,7 @@ if ($nboftargetok) { #----------------------- if ($CHOOSEDTARGET{'-CHKSUM'}) { - print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; + print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; print $ret."\n"; # Copy to final dir @@ -466,10 +466,12 @@ if ($nboftargetok) { $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.dsc`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.gz`; + $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.xz`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.gz`; + $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.xz`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.xz`; $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`; @@ -849,6 +851,8 @@ if ($nboftargetok) { unlink("$NEWDESTI/${FILENAMEDEB}.changes"); print "Remove target ${FILENAMEDEB}.debian.tar.gz...\n"; unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.gz"); + print "Remove target ${FILENAMEDEB}.debian.tar.xz...\n"; + unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.xz"); print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n"; unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz"); @@ -1024,7 +1028,7 @@ if ($nboftargetok) { $ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`; - $ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`; + $ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`; next; } @@ -1168,7 +1172,7 @@ if ($nboftargetok) { "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)', "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF - "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF + "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF "$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)', "$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM', @@ -1181,8 +1185,7 @@ if ($nboftargetok) { "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu', "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu', "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu', - "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu', - "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu', + "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu', "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu', "$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows', "$DESTI/standard/$FILENAMETGZ.tgz"=>'standard', diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 08d02e8b2b8..589e2a3f55c 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -1,7 +1,7 @@ #---------------------------------------------------------------------------- # \file dolibarr.pl # \brief Dolibarr script install for Virtualmin Pro -# \author (c)2009-2017 Regis Houssin +# \author (c)2009-2018 Regis Houssin #---------------------------------------------------------------------------- @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "5.0.4", "4.0.6", "3.9.4" ); +return ( "7.0.0", "6.0.5", "5.0.7" ); } sub script_dolibarr_release @@ -386,14 +386,16 @@ sub script_dolibarr_check_latest { local ($ver) = @_; local @vers = &osdn_package_versions("dolibarr", - $ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" : - $ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" : - $ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" : - $ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[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" : + $ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[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); return $ver eq $vers[0] ? undef : $vers[0]; diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 6df6ccf052e..65da8cabfd7 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -160,6 +160,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/adherents %_datadir/dolibarr/htdocs/admin %_datadir/dolibarr/htdocs/api +%_datadir/dolibarr/htdocs/asset %_datadir/dolibarr/htdocs/asterisk %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog @@ -176,6 +177,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/custom +%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/expedition diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index f99836b7f74..2fed89c03f3 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -240,6 +240,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/adherents %_datadir/dolibarr/htdocs/admin %_datadir/dolibarr/htdocs/api +%_datadir/dolibarr/htdocs/asset %_datadir/dolibarr/htdocs/asterisk %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog @@ -256,6 +257,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/custom +%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/expedition diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 1034615c80a..fb15a2d2d92 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -157,6 +157,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/adherents %_datadir/dolibarr/htdocs/admin %_datadir/dolibarr/htdocs/api +%_datadir/dolibarr/htdocs/asset %_datadir/dolibarr/htdocs/asterisk %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog @@ -173,6 +174,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/custom +%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/expedition diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index eb1887f229f..70eba841bd8 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -168,6 +168,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/adherents %_datadir/dolibarr/htdocs/admin %_datadir/dolibarr/htdocs/api +%_datadir/dolibarr/htdocs/asset %_datadir/dolibarr/htdocs/asterisk %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog @@ -184,6 +185,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/custom +%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/expedition diff --git a/build/travis-ci/apache.conf b/build/travis-ci/apache.conf index 5ba713924f2..a4965c40d68 100644 --- a/build/travis-ci/apache.conf +++ b/build/travis-ci/apache.conf @@ -1,11 +1,10 @@ DocumentRoot %TRAVIS_BUILD_DIR%/htdocs - + Options FollowSymLinks MultiViews ExecCGI AllowOverride All - Order deny,allow - Allow from all + Require all granted # Wire up Apache to use Travis CI's php-fpm. @@ -14,5 +13,9 @@ 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 + + + Require all granted + diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 9e6ab3a8ddc..cdbc2e2bb40 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -90,6 +90,14 @@ var vTmpNode=this.newNode(vTmpCell, 'div', null, ''); vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']); vTmpNode.setAttribute('href',vTaskList[i].getLink()); +* Replace '% Comp.' to have a smaller text column header +'comp':'% Comp.' +with +'comp':'%' + + + + JCROP: ------ diff --git a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql index 57e13bb369b..bd5789f0a6b 100644 --- a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql @@ -1,13 +1,13 @@ --- MySQL dump 10.15 Distrib 10.0.33-MariaDB, for debian-linux-gnu (x86_64) +-- MySQL dump 10.13 Distrib 5.5.59, for debian-linux-gnu (x86_64) -- --- Host: localhost Database: dolibarrdemo +-- Host: localhost Database: dolibarr_7 -- ------------------------------------------------------ --- Server version 10.0.33-MariaDB-0ubuntu0.16.04.1 +-- Server version 5.5.59-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; +/*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -27,23 +27,23 @@ CREATE TABLE `llx_accounting_account` ( `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_pcg_version` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `pcg_type` varchar(20) NOT NULL, - `pcg_subtype` varchar(20) NOT NULL, - `account_number` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `account_parent` varchar(32) DEFAULT '0', - `label` varchar(255) DEFAULT NULL, + `fk_pcg_version` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `pcg_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `pcg_subtype` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `account_number` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `account_parent` varchar(32) COLLATE utf8_unicode_ci DEFAULT '0', + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_accounting_category` int(11) DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_accountingaccount_fk_pcg_version` (`fk_pcg_version`), KEY `idx_accounting_account_account_number` (`account_number`), CONSTRAINT `fk_accounting_account_fk_pcg_version` FOREIGN KEY (`fk_pcg_version`) REFERENCES `llx_accounting_system` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=4785 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4785 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -52,7 +52,7 @@ CREATE TABLE `llx_accounting_account` ( LOCK TABLES `llx_accounting_account` WRITE; /*!40000 ALTER TABLE `llx_accounting_account` DISABLE KEYS */; -INSERT INTO `llx_accounting_account` VALUES (1,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','CAPITAL','101','1401','Capital',0,NULL,NULL,1,NULL,NULL),(2,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','105','1401','Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(3,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1061','1401','Réserve légale',0,NULL,NULL,1,NULL,NULL),(4,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1063','1401','Réserves statutaires ou contractuelles',0,NULL,NULL,1,NULL,NULL),(5,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1064','1401','Réserves réglementées',0,NULL,NULL,1,NULL,NULL),(6,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1068','1401','Autres réserves',0,NULL,NULL,1,NULL,NULL),(7,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','108','1401','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(8,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','12','1401','Résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(9,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','145','1401','Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(10,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','146','1401','Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(11,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','147','1401','Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(12,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','148','1401','Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(13,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','15','1401','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(14,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','16','1401','Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(15,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','20','1402','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(16,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','201','15','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(17,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','206','15','Droit au bail',0,NULL,NULL,1,NULL,NULL),(18,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','207','15','Fonds commercial',0,NULL,NULL,1,NULL,NULL),(19,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','208','15','Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(20,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','21','1402','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(21,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','23','1402','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(22,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','27','1402','Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(23,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','280','1402','Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(24,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','281','1402','Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(25,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','290','1402','Provisions pour dépréciation des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(26,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','291','1402','Provisions pour dépréciation des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(28,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','31','1403','Matieres premières',0,NULL,NULL,1,NULL,NULL),(29,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','32','1403','Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(30,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','33','1403','En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(31,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','34','1403','En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(32,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','35','1403','Stocks de produits',0,NULL,NULL,1,NULL,NULL),(33,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','37','1403','Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(35,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','392','1403','Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(38,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','395','1403','Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(39,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','397','1403','Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(40,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','SUPPLIER','400','1404','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(41,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','409','1404','Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(42,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','CUSTOMER','410','1404','Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(43,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','419','1404','Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(44,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','421','1404','Personnel',0,NULL,NULL,1,NULL,NULL),(45,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','428','1404','Personnel',0,NULL,NULL,1,NULL,NULL),(46,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','43','1404','Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(47,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','444','1404','Etat - impôts sur bénéfice',0,NULL,NULL,1,NULL,NULL),(48,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','445','1404','Etat - Taxes sur chiffre affaires',0,NULL,NULL,1,NULL,NULL),(49,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','447','1404','Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(50,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','45','1404','Groupe et associes',0,NULL,NULL,1,NULL,NULL),(51,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','455','50','Associés',0,NULL,NULL,1,NULL,NULL),(52,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','46','1404','Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(53,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','47','1404','Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(54,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','481','1404','Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(55,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','486','1404','Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(56,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','487','1404','Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(57,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','491','1404','Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(59,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','50','1405','Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(60,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','BANK','51','1405','Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(61,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','CASH','53','1405','Caisse',0,NULL,NULL,1,NULL,NULL),(62,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','54','1405','Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(63,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','58','1405','Virements internes',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(65,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','PRODUCT','60','1406','Achats',0,NULL,NULL,1,NULL,NULL),(66,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','603','65','Variations des stocks',0,NULL,NULL,1,NULL,NULL),(67,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SERVICE','61','1406','Services extérieurs',0,NULL,NULL,1,NULL,NULL),(68,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','62','1406','Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(69,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','63','1406','Impôts, taxes et versements assimiles',0,NULL,NULL,1,NULL,NULL),(70,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','641','1406','Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(71,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','644','1406','Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(72,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SOCIAL','645','1406','Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(73,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','646','1406','Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(74,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','65','1406','Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(75,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','66','1406','Charges financières',0,NULL,NULL,1,NULL,NULL),(76,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','67','1406','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(77,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','681','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(78,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','686','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(79,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','687','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(80,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','691','1406','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(81,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','695','1406','Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(82,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','697','1406','Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(83,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','699','1406','Produits',0,NULL,NULL,1,NULL,NULL),(84,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','701','1407','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(85,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','SERVICE','706','1407','Prestations de services',0,NULL,NULL,1,NULL,NULL),(86,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','707','1407','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(87,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','708','1407','Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(88,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','709','1407','Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(89,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','713','1407','Variation des stocks',0,NULL,NULL,1,NULL,NULL),(90,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','72','1407','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(91,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','73','1407','Produits nets partiels sur opérations à long terme',0,NULL,NULL,1,NULL,NULL),(92,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','74','1407','Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(93,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','75','1407','Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(94,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','753','93','Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(95,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','754','93','Ristournes perçues des coopératives',0,NULL,NULL,1,NULL,NULL),(96,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','755','93','Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(97,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','76','1407','Produits financiers',0,NULL,NULL,1,NULL,NULL),(98,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','77','1407','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(99,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','781','1407','Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(100,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','786','1407','Reprises sur provisions pour risques',0,NULL,NULL,1,NULL,NULL),(101,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','787','1407','Reprises sur provisions',0,NULL,NULL,1,NULL,NULL),(102,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','79','1407','Transferts de charges',0,NULL,NULL,1,NULL,NULL),(103,1,NULL,'2017-02-20 10:49:11','PCG99-BASE','CAPIT','XXXXXX','10','1501','Capital et réserves',0,NULL,NULL,1,NULL,NULL),(104,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','CAPITAL','101','103','Capital',0,NULL,NULL,1,NULL,NULL),(105,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','104','103','Primes liées au capital social',0,NULL,NULL,1,NULL,NULL),(106,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','105','103','Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(107,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','106','103','Réserves',0,NULL,NULL,1,NULL,NULL),(108,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','107','103','Ecart d\'equivalence',0,NULL,NULL,1,NULL,NULL),(109,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','108','103','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(110,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','109','103','Actionnaires : capital souscrit - non appelé',0,NULL,NULL,1,NULL,NULL),(111,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','11','1501','Report à nouveau (solde créditeur ou débiteur)',0,NULL,NULL,1,NULL,NULL),(112,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','110','111','Report à nouveau (solde créditeur)',0,NULL,NULL,1,NULL,NULL),(113,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','119','111','Report à nouveau (solde débiteur)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(115,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','120','114','Résultat de l\'exercice (bénéfice)',0,NULL,NULL,1,NULL,NULL),(116,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','129','114','Résultat de l\'exercice (perte)',0,NULL,NULL,1,NULL,NULL),(117,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','13','1501','Subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(118,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','131','117','Subventions d\'équipement',0,NULL,NULL,1,NULL,NULL),(119,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','138','117','Autres subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(120,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','139','117','Subventions d\'investissement inscrites au compte de résultat',0,NULL,NULL,1,NULL,NULL),(121,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','14','1501','Provisions réglementées',0,NULL,NULL,1,NULL,NULL),(122,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','142','121','Provisions réglementées relatives aux immobilisations',0,NULL,NULL,1,NULL,NULL),(123,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','143','121','Provisions réglementées relatives aux stocks',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(125,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','145','121','Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(126,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','146','121','Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(127,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','147','121','Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(128,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','148','121','Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(129,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','15','1501','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(130,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','151','129','Provisions pour risques',0,NULL,NULL,1,NULL,NULL),(131,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','153','129','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(132,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','154','129','Provisions pour restructurations',0,NULL,NULL,1,NULL,NULL),(133,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','155','129','Provisions pour impôts',0,NULL,NULL,1,NULL,NULL),(134,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','156','129','Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',0,NULL,NULL,1,NULL,NULL),(135,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','157','129','Provisions pour charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(136,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','158','129','Autres provisions pour charges',0,NULL,NULL,1,NULL,NULL),(137,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','16','1501','Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(138,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','161','137','Emprunts obligataires convertibles',0,NULL,NULL,1,NULL,NULL),(139,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','163','137','Autres emprunts obligataires',0,NULL,NULL,1,NULL,NULL),(140,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','164','137','Emprunts auprès des établissements de crédit',0,NULL,NULL,1,NULL,NULL),(141,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','165','137','Dépôts et cautionnements reçus',0,NULL,NULL,1,NULL,NULL),(142,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','166','137','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(143,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','167','137','Emprunts et dettes assortis de conditions particulières',0,NULL,NULL,1,NULL,NULL),(144,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','168','137','Autres emprunts et dettes assimilées',0,NULL,NULL,1,NULL,NULL),(145,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','169','137','Primes de remboursement des obligations',0,NULL,NULL,1,NULL,NULL),(146,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','17','1501','Dettes rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(147,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','171','146','Dettes rattachées à des participations (groupe)',0,NULL,NULL,1,NULL,NULL),(148,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','174','146','Dettes rattachées à des participations (hors groupe)',0,NULL,NULL,1,NULL,NULL),(149,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','178','146','Dettes rattachées à des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(151,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','181','150','Comptes de liaison des établissements',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(154,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','188','150','Comptes de liaison des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(155,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','20','1502','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(156,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','201','155','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(157,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','203','155','Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(159,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','206','155','Droit au bail',0,NULL,NULL,1,NULL,NULL),(160,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','207','155','Fonds commercial',0,NULL,NULL,1,NULL,NULL),(161,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','208','155','Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(162,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','21','1502','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(163,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','211','162','Terrains',0,NULL,NULL,1,NULL,NULL),(164,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','212','162','Agencements et aménagements de terrains',0,NULL,NULL,1,NULL,NULL),(165,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','213','162','Constructions',0,NULL,NULL,1,NULL,NULL),(166,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','214','162','Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(167,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','215','162','Installations techniques, matériels et outillage industriels',0,NULL,NULL,1,NULL,NULL),(168,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','218','162','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(169,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','22','1502','Immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(170,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','23','1502','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(171,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','231','170','Immobilisations corporelles en cours',0,NULL,NULL,1,NULL,NULL),(172,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','232','170','Immobilisations incorporelles en cours',0,NULL,NULL,1,NULL,NULL),(173,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','237','170','Avances et acomptes versés sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(176,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','26','1502','Participations et créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(177,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','261','176','Titres de participation',0,NULL,NULL,1,NULL,NULL),(178,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','266','176','Autres formes de participation',0,NULL,NULL,1,NULL,NULL),(179,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','267','176','Créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(182,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','27','1502','Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(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é)',0,NULL,NULL,1,NULL,NULL),(184,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','272','183','Titres immobilisés (droit de créance)',0,NULL,NULL,1,NULL,NULL),(185,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','273','183','Titres immobilisés de l\'activité de portefeuille',0,NULL,NULL,1,NULL,NULL),(186,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','274','183','Prêts',0,NULL,NULL,1,NULL,NULL),(187,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','275','183','Dépôts et cautionnements versés',0,NULL,NULL,1,NULL,NULL),(188,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','276','183','Autres créances immobilisées',0,NULL,NULL,1,NULL,NULL),(189,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','277','183','(Actions propres ou parts propres)',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(191,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','28','1502','Amortissements des immobilisations',0,NULL,NULL,1,NULL,NULL),(192,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','280','191','Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(193,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','281','191','Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(194,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','282','191','Amortissements des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(195,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','29','1502','Dépréciations des immobilisations',0,NULL,NULL,1,NULL,NULL),(196,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','290','195','Dépréciations des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(197,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','291','195','Dépréciations des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(198,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','292','195','Dépréciations des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(199,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','293','195','Dépréciations des immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(202,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','31','1503','Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(203,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','311','202','Matières (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(204,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','312','202','Matières (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(205,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','317','202','Fournitures A, B, C,',0,NULL,NULL,1,NULL,NULL),(206,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','32','1503','Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(207,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','321','206','Matières consommables',0,NULL,NULL,1,NULL,NULL),(208,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','322','206','Fournitures consommables',0,NULL,NULL,1,NULL,NULL),(209,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','326','206','Emballages',0,NULL,NULL,1,NULL,NULL),(210,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','33','1503','En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(211,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','331','210','Produits en cours',0,NULL,NULL,1,NULL,NULL),(212,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','335','210','Travaux en cours',0,NULL,NULL,1,NULL,NULL),(213,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','34','1503','En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(214,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','341','213','Etudes en cours',0,NULL,NULL,1,NULL,NULL),(215,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','345','213','Prestations de services en cours',0,NULL,NULL,1,NULL,NULL),(216,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','35','1503','Stocks de produits',0,NULL,NULL,1,NULL,NULL),(217,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','351','216','Produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(218,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','355','216','Produits finis',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(220,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','37','1503','Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(221,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','371','220','Marchandises (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(222,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','372','220','Marchandises (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(225,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','392','223','Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(228,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','395','223','Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(229,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','397','223','Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(230,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','40','1504','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(231,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','400','230','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(232,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','SUPPLIER','401','230','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(233,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','403','230','Fournisseurs - Effets à payer',0,NULL,NULL,1,NULL,NULL),(234,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','404','230','Fournisseurs d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(235,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','405','230','Fournisseurs d\'immobilisations - Effets à payer',0,NULL,NULL,1,NULL,NULL),(236,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','408','230','Fournisseurs - Factures non parvenues',0,NULL,NULL,1,NULL,NULL),(237,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','409','230','Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(238,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','41','1504','Clients et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(239,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','410','238','Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(240,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','CUSTOMER','411','238','Clients',0,NULL,NULL,1,NULL,NULL),(241,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','413','238','Clients - Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(242,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','416','238','Clients douteux ou litigieux',0,NULL,NULL,1,NULL,NULL),(243,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','418','238','Clients - Produits non encore facturés',0,NULL,NULL,1,NULL,NULL),(244,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','419','238','Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(245,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','42','1504','Personnel et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(246,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','421','245','Personnel - Rémunérations dues',0,NULL,NULL,1,NULL,NULL),(247,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','422','245','Comités d\'entreprises, d\'établissement, ...',0,NULL,NULL,1,NULL,NULL),(248,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','424','245','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(249,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','425','245','Personnel - Avances et acomptes',0,NULL,NULL,1,NULL,NULL),(250,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','426','245','Personnel - Dépôts',0,NULL,NULL,1,NULL,NULL),(251,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','427','245','Personnel - Oppositions',0,NULL,NULL,1,NULL,NULL),(252,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','428','245','Personnel - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(253,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','43','1504','Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(254,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','431','253','Sécurité sociale',0,NULL,NULL,1,NULL,NULL),(255,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','437','253','Autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(256,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','438','253','Organismes sociaux - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(257,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','44','1504','État et autres collectivités publiques',0,NULL,NULL,1,NULL,NULL),(258,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','441','257','État - Subventions à recevoir',0,NULL,NULL,1,NULL,NULL),(259,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','442','257','Etat - Impôts et taxes recouvrables sur des tiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(261,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','444','257','Etat - Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(262,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','445','257','Etat - Taxes sur le chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(263,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','446','257','Obligations cautionnées',0,NULL,NULL,1,NULL,NULL),(264,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','447','257','Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(265,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','448','257','Etat - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(266,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','449','257','Quotas d\'émission à restituer à l\'Etat',0,NULL,NULL,1,NULL,NULL),(267,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','45','1504','Groupe et associes',0,NULL,NULL,1,NULL,NULL),(268,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','451','267','Groupe',0,NULL,NULL,1,NULL,NULL),(269,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','455','267','Associés - Comptes courants',0,NULL,NULL,1,NULL,NULL),(270,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','456','267','Associés - Opérations sur le capital',0,NULL,NULL,1,NULL,NULL),(271,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','457','267','Associés - Dividendes à payer',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(273,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','46','1504','Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(274,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','462','273','Créances sur cessions d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(275,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','464','273','Dettes sur acquisitions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(277,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','467','273','Autres comptes débiteurs ou créditeurs',0,NULL,NULL,1,NULL,NULL),(278,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','468','273','Divers - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(279,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','47','1504','Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(280,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','471','279','Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(281,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','476','279','Différence de conversion - Actif',0,NULL,NULL,1,NULL,NULL),(282,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','477','279','Différences de conversion - Passif',0,NULL,NULL,1,NULL,NULL),(283,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','478','279','Autres comptes transitoires',0,NULL,NULL,1,NULL,NULL),(284,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','48','1504','Comptes de régularisation',0,NULL,NULL,1,NULL,NULL),(285,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','481','284','Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(286,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','486','284','Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(287,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','487','284','Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(289,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','489','284','Quotas d\'émission alloués par l\'Etat',0,NULL,NULL,1,NULL,NULL),(290,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','49','1504','Provisions pour dépréciation des comptes de tiers',0,NULL,NULL,1,NULL,NULL),(291,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','491','290','Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(294,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','50','1505','Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(295,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','501','294','Parts dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(296,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','502','294','Actions propres',0,NULL,NULL,1,NULL,NULL),(297,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','503','294','Actions',0,NULL,NULL,1,NULL,NULL),(298,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','504','294','Autres titres conférant un droit de propriété',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(300,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','506','294','Obligations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(304,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','51','1505','Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(305,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','511','304','Valeurs à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(306,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','BANK','512','304','Banques',0,NULL,NULL,1,NULL,NULL),(307,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','514','304','Chèques postaux',0,NULL,NULL,1,NULL,NULL),(308,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','515','304','\"Caisses\" du Trésor et des établissements publics',0,NULL,NULL,1,NULL,NULL),(309,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','516','304','Sociétés de bourse',0,NULL,NULL,1,NULL,NULL),(310,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','517','304','Autres organismes financiers',0,NULL,NULL,1,NULL,NULL),(311,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','518','304','Intérêts courus',0,NULL,NULL,1,NULL,NULL),(312,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','519','304','Concours bancaires courants',0,NULL,NULL,1,NULL,NULL),(313,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','52','1505','Instruments de trésorerie',0,NULL,NULL,1,NULL,NULL),(314,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','CASH','53','1505','Caisse',0,NULL,NULL,1,NULL,NULL),(315,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','531','314','Caisse siège social',0,NULL,NULL,1,NULL,NULL),(316,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','532','314','Caisse succursale (ou usine) A',0,NULL,NULL,1,NULL,NULL),(317,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','533','314','Caisse succursale (ou usine) B',0,NULL,NULL,1,NULL,NULL),(318,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','54','1505','Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(319,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','58','1505','Virements internes',0,NULL,NULL,1,NULL,NULL),(320,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','59','1505','Provisions pour dépréciation des comptes financiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(322,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','PRODUCT','60','1506','Achats',0,NULL,NULL,1,NULL,NULL),(323,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','601','322','Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(324,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','602','322','Achats stockés - Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(325,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','603','322','Variations des stocks (approvisionnements et marchandises)',0,NULL,NULL,1,NULL,NULL),(326,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','604','322','Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(327,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','605','322','Achats de matériel, équipements et travaux',0,NULL,NULL,1,NULL,NULL),(328,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','606','322','Achats non stockés de matière et fournitures',0,NULL,NULL,1,NULL,NULL),(329,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','607','322','Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(330,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','608','322','(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',0,NULL,NULL,1,NULL,NULL),(331,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','609','322','Rabais, remises et ristournes obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(332,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SERVICE','61','1506','Services extérieurs',0,NULL,NULL,1,NULL,NULL),(333,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','611','332','Sous-traitance générale',0,NULL,NULL,1,NULL,NULL),(334,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','612','332','Redevances de crédit-bail',0,NULL,NULL,1,NULL,NULL),(335,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','613','332','Locations',0,NULL,NULL,1,NULL,NULL),(336,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','614','332','Charges locatives et de copropriété',0,NULL,NULL,1,NULL,NULL),(337,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','615','332','Entretien et réparations',0,NULL,NULL,1,NULL,NULL),(338,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','616','332','Primes d\'assurances',0,NULL,NULL,1,NULL,NULL),(339,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','617','332','Etudes et recherches',0,NULL,NULL,1,NULL,NULL),(340,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','618','332','Divers',0,NULL,NULL,1,NULL,NULL),(341,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','619','332','Rabais, remises et ristournes obtenus sur services extérieurs',0,NULL,NULL,1,NULL,NULL),(342,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','62','1506','Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(343,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','621','342','Personnel extérieur à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(344,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','622','342','Rémunérations d\'intermédiaires et honoraires',0,NULL,NULL,1,NULL,NULL),(345,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','623','342','Publicité, publications, relations publiques',0,NULL,NULL,1,NULL,NULL),(346,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','624','342','Transports de biens et transports collectifs du personnel',0,NULL,NULL,1,NULL,NULL),(347,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','625','342','Déplacements, missions et réceptions',0,NULL,NULL,1,NULL,NULL),(348,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','626','342','Frais postaux et de télécommunications',0,NULL,NULL,1,NULL,NULL),(349,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','627','342','Services bancaires et assimilés',0,NULL,NULL,1,NULL,NULL),(350,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','628','342','Divers',0,NULL,NULL,1,NULL,NULL),(351,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','629','342','Rabais, remises et ristournes obtenus sur autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(352,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','63','1506','Impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(353,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','631','352','Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(354,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','633','352','Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',0,NULL,NULL,1,NULL,NULL),(355,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','635','352','Autres impôts, taxes et versements assimilés (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(356,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','637','352','Autres impôts, taxes et versements assimilés (autres organismes)',0,NULL,NULL,1,NULL,NULL),(357,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','64','1506','Charges de personnel',0,NULL,NULL,1,NULL,NULL),(358,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','641','357','Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(359,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','644','357','Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(360,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SOCIAL','645','357','Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(361,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','646','357','Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(362,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','647','357','Autres charges sociales',0,NULL,NULL,1,NULL,NULL),(363,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','648','357','Autres charges de personnel',0,NULL,NULL,1,NULL,NULL),(364,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','65','1506','Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(365,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','651','364','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(366,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','653','364','Jetons de présence',0,NULL,NULL,1,NULL,NULL),(367,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','654','364','Pertes sur créances irrécouvrables',0,NULL,NULL,1,NULL,NULL),(368,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','655','364','Quote-part de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(369,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','658','364','Charges diverses de gestion courante',0,NULL,NULL,1,NULL,NULL),(370,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','66','1506','Charges financières',0,NULL,NULL,1,NULL,NULL),(371,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','661','370','Charges d\'intérêts',0,NULL,NULL,1,NULL,NULL),(372,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','664','370','Pertes sur créances liées à des participations',0,NULL,NULL,1,NULL,NULL),(373,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','665','370','Escomptes accordés',0,NULL,NULL,1,NULL,NULL),(374,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','666','370','Pertes de change',0,NULL,NULL,1,NULL,NULL),(375,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','667','370','Charges nettes sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(376,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','668','370','Autres charges financières',0,NULL,NULL,1,NULL,NULL),(377,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','67','1506','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(378,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','671','377','Charges exceptionnelles sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(379,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','672','377','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(380,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','675','377','Valeurs comptables des éléments d\'actif cédés',0,NULL,NULL,1,NULL,NULL),(381,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','678','377','Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(382,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','68','1506','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(383,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','681','382','Dotations aux amortissements et aux provisions - Charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(384,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','686','382','Dotations aux amortissements et aux provisions - Charges financières',0,NULL,NULL,1,NULL,NULL),(385,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','687','382','Dotations aux amortissements et aux provisions - Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(386,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','69','1506','Participation des salariés - impôts sur les bénéfices et assimiles',0,NULL,NULL,1,NULL,NULL),(387,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','691','386','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(388,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','695','386','Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(389,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','696','386','Suppléments d\'impôt sur les sociétés liés aux distributions',0,NULL,NULL,1,NULL,NULL),(390,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','697','386','Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(391,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','698','386','Intégration fiscale',0,NULL,NULL,1,NULL,NULL),(392,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','699','386','Produits - Reports en arrière des déficits',0,NULL,NULL,1,NULL,NULL),(393,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','70','1507','Ventes de produits fabriqués, prestations de services, marchandises',0,NULL,NULL,1,NULL,NULL),(394,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','701','393','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(395,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','702','393','Ventes de produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(396,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','703','393','Ventes de produits résiduels',0,NULL,NULL,1,NULL,NULL),(397,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','704','393','Travaux',0,NULL,NULL,1,NULL,NULL),(398,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','705','393','Etudes',0,NULL,NULL,1,NULL,NULL),(399,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','SERVICE','706','393','Prestations de services',0,NULL,NULL,1,NULL,NULL),(400,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','707','393','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(401,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','708','393','Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(402,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','709','393','Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(403,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','71','1507','Production stockée (ou déstockage)',0,NULL,NULL,1,NULL,NULL),(404,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','713','403','Variation des stocks (en-cours de production, produits)',0,NULL,NULL,1,NULL,NULL),(405,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','72','1507','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(406,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','721','405','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(407,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','722','405','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(408,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','74','1507','Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(409,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','75','1507','Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(410,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','751','409','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(411,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','752','409','Revenus des immeubles non affectés à des activités professionnelles',0,NULL,NULL,1,NULL,NULL),(412,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','753','409','Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(413,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','754','409','Ristournes perçues des coopératives (provenant des excédents)',0,NULL,NULL,1,NULL,NULL),(414,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','755','409','Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(415,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','758','409','Produits divers de gestion courante',0,NULL,NULL,1,NULL,NULL),(416,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','76','1507','Produits financiers',0,NULL,NULL,1,NULL,NULL),(417,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','761','416','Produits de participations',0,NULL,NULL,1,NULL,NULL),(418,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','762','416','Produits des autres immobilisations financières',0,NULL,NULL,1,NULL,NULL),(419,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','763','416','Revenus des autres créances',0,NULL,NULL,1,NULL,NULL),(420,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','764','416','Revenus des valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(421,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','765','416','Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(422,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','766','416','Gains de change',0,NULL,NULL,1,NULL,NULL),(423,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','767','416','Produits nets sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(424,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','768','416','Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(425,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','77','1507','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(426,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','771','425','Produits exceptionnels sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(427,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','772','425','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(428,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','775','425','Produits des cessions d\'éléments d\'actif',0,NULL,NULL,1,NULL,NULL),(429,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','777','425','Quote-part des subventions d\'investissement virée au résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(430,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','778','425','Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(431,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','78','1507','Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(432,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','781','431','Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',0,NULL,NULL,1,NULL,NULL),(433,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','786','431','Reprises sur provisions pour risques (à inscrire dans les produits financiers)',0,NULL,NULL,1,NULL,NULL),(434,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','787','431','Reprises sur provisions (à inscrire dans les produits exceptionnels)',0,NULL,NULL,1,NULL,NULL),(435,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','79','1507','Transferts de charges',0,NULL,NULL,1,NULL,NULL),(436,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','791','435','Transferts de charges d\'exploitation ',0,NULL,NULL,1,NULL,NULL),(437,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','796','435','Transferts de charges financières',0,NULL,NULL,1,NULL,NULL),(438,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','797','435','Transferts de charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(439,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','10','1351','Capital',0,NULL,NULL,1,NULL,NULL),(440,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','100','439','Capital souscrit ou capital personnel',0,NULL,NULL,1,NULL,NULL),(441,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1000','440','Capital non amorti',0,NULL,NULL,1,NULL,NULL),(442,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1001','440','Capital amorti',0,NULL,NULL,1,NULL,NULL),(443,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','101','439','Capital non appelé',0,NULL,NULL,1,NULL,NULL),(444,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','109','439','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(445,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1090','444','Opérations courantes',0,NULL,NULL,1,NULL,NULL),(446,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1091','444','Impôts personnels',0,NULL,NULL,1,NULL,NULL),(447,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1092','444','Rémunérations et autres avantages',0,NULL,NULL,1,NULL,NULL),(448,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','11','1351','Primes d\'émission',0,NULL,NULL,1,NULL,NULL),(449,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','12','1351','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(450,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','120','449','Plus-values de réévaluation sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(451,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1200','450','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(452,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1201','450','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(453,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','121','449','Plus-values de réévaluation sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(454,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1210','453','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(455,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1211','453','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(456,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','122','449','Plus-values de réévaluation sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(457,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1220','456','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(458,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1221','456','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(459,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','123','449','Plus-values de réévaluation sur stocks',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(461,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','13','1351','Réserve',0,NULL,NULL,1,NULL,NULL),(462,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','130','461','Réserve légale',0,NULL,NULL,1,NULL,NULL),(463,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','131','461','Réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(464,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1310','463','Réserve pour actions propres',0,NULL,NULL,1,NULL,NULL),(465,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1311','463','Autres réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(466,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','132','461','Réserves immunisées',0,NULL,NULL,1,NULL,NULL),(467,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','133','461','Réserves disponibles',0,NULL,NULL,1,NULL,NULL),(468,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1330','467','Réserve pour régularisation de dividendes',0,NULL,NULL,1,NULL,NULL),(469,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1331','467','Réserve pour renouvellement des immobilisations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(471,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','14','1351','Bénéfice reporté (ou perte reportée)',0,NULL,NULL,1,NULL,NULL),(472,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','15','1351','Subsides en capital',0,NULL,NULL,1,NULL,NULL),(473,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','150','472','Montants obtenus',0,NULL,NULL,1,NULL,NULL),(474,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','151','472','Montants transférés aux résultats',0,NULL,NULL,1,NULL,NULL),(475,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','16','1351','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(476,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','160','475','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(477,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','161','475','Provisions pour charges fiscales',0,NULL,NULL,1,NULL,NULL),(478,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','162','475','Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(479,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','163','475','à 169 Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(485,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','169','475','Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(486,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1690','485','Pour litiges en cours',0,NULL,NULL,1,NULL,NULL),(487,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1691','485','Pour amendes, doubles droits et pénalités',0,NULL,NULL,1,NULL,NULL),(488,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1692','485','Pour propre assureur',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(490,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1695','485','Provision pour charge de liquidation',0,NULL,NULL,1,NULL,NULL),(491,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1696','485','Provision pour départ de personnel',0,NULL,NULL,1,NULL,NULL),(492,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1699','485','Pour risques divers',0,NULL,NULL,1,NULL,NULL),(493,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17','1351','Dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(494,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','170','493','Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(495,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1700','494','Convertibles',0,NULL,NULL,1,NULL,NULL),(496,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1701','494','Non convertibles',0,NULL,NULL,1,NULL,NULL),(497,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','171','493','Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(498,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1710','498','Convertibles',0,NULL,NULL,1,NULL,NULL),(499,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1711','498','Non convertibles',0,NULL,NULL,1,NULL,NULL),(500,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','172','493','Dettes de location-financement et assimilés',0,NULL,NULL,1,NULL,NULL),(501,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1720','500','Dettes de location-financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(502,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1721','500','Dettes de location-financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(503,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1722','500','Dettes sur droits réels sur immeubles',0,NULL,NULL,1,NULL,NULL),(504,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','173','493','Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(505,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1730','504','Dettes en compte',0,NULL,NULL,1,NULL,NULL),(506,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17300','505','Banque A',0,NULL,NULL,1,NULL,NULL),(507,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17301','505','Banque B',0,NULL,NULL,1,NULL,NULL),(508,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17302','505','Banque C',0,NULL,NULL,1,NULL,NULL),(509,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17303','505','Banque D',0,NULL,NULL,1,NULL,NULL),(510,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1731','504','Promesses',0,NULL,NULL,1,NULL,NULL),(511,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17310','510','Banque A',0,NULL,NULL,1,NULL,NULL),(512,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17311','510','Banque B',0,NULL,NULL,1,NULL,NULL),(513,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17312','510','Banque C',0,NULL,NULL,1,NULL,NULL),(514,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17313','510','Banque D',0,NULL,NULL,1,NULL,NULL),(515,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1732','504','Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(516,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17320','515','Banque A',0,NULL,NULL,1,NULL,NULL),(517,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17321','515','Banque B',0,NULL,NULL,1,NULL,NULL),(518,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17322','515','Banque C',0,NULL,NULL,1,NULL,NULL),(519,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17323','515','Banque D',0,NULL,NULL,1,NULL,NULL),(520,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','174','493','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(521,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175','493','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(522,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1750','521','Fournisseurs : dettes en compte',0,NULL,NULL,1,NULL,NULL),(523,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17500','522','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(524,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175000','523','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(525,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175001','523','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(526,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17501','522','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(527,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175010','526','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(528,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175011','526','Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(529,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175012','526','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(530,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1751','521','Effets à payer',0,NULL,NULL,1,NULL,NULL),(531,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17510','530','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(532,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175100','531','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(533,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175101','531','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(534,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17511','530','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(535,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175110','534','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(536,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175111','534','Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(537,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175112','534','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(538,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','176','493','Acomptes reçus sur commandes',0,NULL,NULL,1,NULL,NULL),(539,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','178','493','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(540,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','179','493','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(541,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1790','540','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(543,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1792','540','Administrateurs, gérants et associés',0,NULL,NULL,1,NULL,NULL),(544,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1794','540','Rentes viagères capitalisées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(546,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1799','540','Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(547,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','18','1351','Comptes de liaison des établissements et succursales',0,NULL,NULL,1,NULL,NULL),(548,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','20','1352','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(549,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','200','548','Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(550,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2000','549','Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(552,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','201','548','Frais d\'émission d\'emprunts et primes de remboursement',0,NULL,NULL,1,NULL,NULL),(553,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2010','552','Agios sur emprunts et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(555,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','202','548','Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(556,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2020','555','Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(557,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2029','555','Amortissements sur autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(558,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','203','548','Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(559,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2030','558','Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(560,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2039','558','Amortissements sur intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(561,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','204','548','Frais de restructuration',0,NULL,NULL,1,NULL,NULL),(562,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2040','561','Coût des frais de restructuration',0,NULL,NULL,1,NULL,NULL),(563,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2049','561','Amortissements sur frais de restructuration',0,NULL,NULL,1,NULL,NULL),(564,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','21','1352','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(565,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','210','564','Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(566,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2100','565','Frais de recherche et de mise au point',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(569,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','211','564','Concessions, brevets, licences, savoir-faire, marque et droits similaires',0,NULL,NULL,1,NULL,NULL),(570,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2110','569','Concessions, brevets, licences, marques, etc',0,NULL,NULL,1,NULL,NULL),(571,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2118','569','Plus-values actées sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(572,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2119','569','Amortissements sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(573,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','212','564','Goodwill',0,NULL,NULL,1,NULL,NULL),(574,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2120','573','Coût d\'acquisition',0,NULL,NULL,1,NULL,NULL),(575,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2128','573','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(576,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2129','573','Amortissements sur goodwill',0,NULL,NULL,1,NULL,NULL),(577,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','213','564','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(578,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22','1352','Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(579,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','220','578','Terrains',0,NULL,NULL,1,NULL,NULL),(580,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2200','579','Terrains',0,NULL,NULL,1,NULL,NULL),(581,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2201','579','Frais d\'acquisition sur terrains',0,NULL,NULL,1,NULL,NULL),(582,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2208','579','Plus-values actées sur terrains',0,NULL,NULL,1,NULL,NULL),(583,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2209','579','Amortissements et réductions de valeur',0,NULL,NULL,1,NULL,NULL),(584,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22090','583','Amortissements sur frais d\'acquisition',0,NULL,NULL,1,NULL,NULL),(585,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22091','583','Réductions de valeur sur terrains',0,NULL,NULL,1,NULL,NULL),(586,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','221','578','Constructions',0,NULL,NULL,1,NULL,NULL),(587,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2210','586','Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(588,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2211','586','Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(589,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2212','586','Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(590,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2213','586','Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(591,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2215','586','Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(592,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2216','586','Frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(593,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2218','586','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(594,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22180','593','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(595,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22181','593','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(596,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22182','593','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(597,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22184','593','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(598,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2219','586','Amortissements sur constructions',0,NULL,NULL,1,NULL,NULL),(599,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22190','598','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(600,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22191','598','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(601,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22192','598','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(602,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22194','598','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(603,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22195','598','Sur constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(604,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22196','598','Sur frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(605,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','222','578','Terrains bâtis',0,NULL,NULL,1,NULL,NULL),(606,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2220','605','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(607,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22200','606','Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(608,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22201','606','Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(609,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22202','606','Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(610,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22203','606','Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(611,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22204','606','Frais d\'acquisition des terrains à bâtir',0,NULL,NULL,1,NULL,NULL),(612,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2228','605','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(613,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22280','612','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(614,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22281','612','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(615,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22282','612','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(616,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22283','612','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(617,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2229','605','Amortissements sur terrains bâtis',0,NULL,NULL,1,NULL,NULL),(618,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22290','617','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(619,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22291','617','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(620,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22292','617','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(621,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22293','617','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(622,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22294','617','Sur frais d\'acquisition des terrains bâtis',0,NULL,NULL,1,NULL,NULL),(623,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','223','578','Autres droits réels sur des immeubles',0,NULL,NULL,1,NULL,NULL),(624,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2230','623','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(625,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2238','623','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(626,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2239','623','Amortissements',0,NULL,NULL,1,NULL,NULL),(627,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','23','1352','Installations, machines et outillages',0,NULL,NULL,1,NULL,NULL),(628,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','230','627','Installations',0,NULL,NULL,1,NULL,NULL),(629,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300','628','Installations bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(630,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301','628','Installations bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(631,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302','628','Installations bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(632,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303','628','Installations voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(633,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300','628','Installation d\'eau',0,NULL,NULL,1,NULL,NULL),(634,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301','628','Installation d\'électricité',0,NULL,NULL,1,NULL,NULL),(635,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302','628','Installation de vapeur',0,NULL,NULL,1,NULL,NULL),(636,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303','628','Installation de gaz',0,NULL,NULL,1,NULL,NULL),(637,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2304','628','Installation de chauffage',0,NULL,NULL,1,NULL,NULL),(638,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2305','628','Installation de conditionnement d\'air',0,NULL,NULL,1,NULL,NULL),(639,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2306','628','Installation de chargement',0,NULL,NULL,1,NULL,NULL),(640,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','231','627','Machines',0,NULL,NULL,1,NULL,NULL),(641,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2310','640','Division A',0,NULL,NULL,1,NULL,NULL),(642,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2311','640','Division B',0,NULL,NULL,1,NULL,NULL),(643,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2312','640','Division C',0,NULL,NULL,1,NULL,NULL),(644,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','237','627','Outillage',0,NULL,NULL,1,NULL,NULL),(645,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2370','644','Division A',0,NULL,NULL,1,NULL,NULL),(646,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2371','644','Division B',0,NULL,NULL,1,NULL,NULL),(647,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2372','644','Division C',0,NULL,NULL,1,NULL,NULL),(648,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','238','627','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(649,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2380','648','Sur installations',0,NULL,NULL,1,NULL,NULL),(650,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2381','648','Sur machines',0,NULL,NULL,1,NULL,NULL),(651,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2382','648','Sur outillage',0,NULL,NULL,1,NULL,NULL),(652,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','239','627','Amortissements',0,NULL,NULL,1,NULL,NULL),(653,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2390','652','Sur installations',0,NULL,NULL,1,NULL,NULL),(654,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2391','652','Sur machines',0,NULL,NULL,1,NULL,NULL),(655,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2392','652','Sur outillage',0,NULL,NULL,1,NULL,NULL),(656,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24','1352','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(657,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','240','656','Mobilier',0,NULL,NULL,1,NULL,NULL),(658,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2400','656','Mobilier',0,NULL,NULL,1,NULL,NULL),(659,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24000','658','Mobilier des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(660,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24001','658','Mobilier des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(661,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24002','658','Mobilier des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(662,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24003','658','Mobilier oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(663,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2401','657','Matériel de bureau et de service social',0,NULL,NULL,1,NULL,NULL),(664,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24010','663','Des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(665,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24011','663','Des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(666,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24012','663','Des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(667,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24013','663','Des oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(668,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2408','657','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(669,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24080','668','Plus-values actées sur mobilier',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(671,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2409','657','Amortissements',0,NULL,NULL,1,NULL,NULL),(672,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24090','671','Amortissements sur mobilier',0,NULL,NULL,1,NULL,NULL),(673,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24091','671','Amortissements sur matériel de bureau et service social',0,NULL,NULL,1,NULL,NULL),(674,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','241','656','Matériel roulant',0,NULL,NULL,1,NULL,NULL),(675,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2410','674','Matériel automobile',0,NULL,NULL,1,NULL,NULL),(676,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24100','675','Voitures',0,NULL,NULL,1,NULL,NULL),(677,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24105','675','Camions',0,NULL,NULL,1,NULL,NULL),(678,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2411','674','Matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(679,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2412','674','Matériel fluvial',0,NULL,NULL,1,NULL,NULL),(680,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2413','674','Matériel naval',0,NULL,NULL,1,NULL,NULL),(681,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2414','674','Matériel aérien',0,NULL,NULL,1,NULL,NULL),(682,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2418','674','Plus-values sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(683,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24180','682','Plus-values sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(684,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24181','682','Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(685,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24182','682','Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(686,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24183','682','Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(687,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24184','682','Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(688,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2419','674','Amortissements sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(689,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24190','688','Amortissements sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(690,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24191','688','Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(691,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24192','688','Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(692,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24193','688','Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(693,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24194','688','Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(694,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','25','1352','Immobilisation détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(695,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','250','694','Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(696,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2500','695','Terrains',0,NULL,NULL,1,NULL,NULL),(697,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2501','695','Constructions',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(700,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','251','694','Installations, machines et outillage',0,NULL,NULL,1,NULL,NULL),(701,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2510','700','Installations',0,NULL,NULL,1,NULL,NULL),(702,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2511','700','Machines',0,NULL,NULL,1,NULL,NULL),(703,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2512','700','Outillage',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(705,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2519','700','Amortissements sur installations machines et outillage pris en leasing',0,NULL,NULL,1,NULL,NULL),(706,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','252','694','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(707,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2520','706','Mobilier',0,NULL,NULL,1,NULL,NULL),(708,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2521','706','Matériel roulant',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(710,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2529','706','Amortissements sur mobilier et matériel roulant en leasing',0,NULL,NULL,1,NULL,NULL),(711,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','26','1352','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(712,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','260','711','Frais d\'aménagements de locaux pris en location',0,NULL,NULL,1,NULL,NULL),(713,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','261','711','Maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(714,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','262','711','Réserve immobilière',0,NULL,NULL,1,NULL,NULL),(715,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','263','711','Matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(716,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','264','711','Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(717,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','268','711','Plus-values actées sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(718,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','269','711','Amortissements sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(720,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2691','718','Amortissements sur maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(721,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2692','718','Amortissements sur réserve immobilière',0,NULL,NULL,1,NULL,NULL),(722,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2693','718','Amortissements sur matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(723,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2694','718','Amortissements sur emballages récupérables',0,NULL,NULL,1,NULL,NULL),(724,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','27','1352','Immobilisations corporelles en cours et acomptes versés',0,NULL,NULL,1,NULL,NULL),(725,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','270','724','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(726,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2700','725','Constructions',0,NULL,NULL,1,NULL,NULL),(727,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2701','725','Installations machines et outillage',0,NULL,NULL,1,NULL,NULL),(728,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2702','725','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(729,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2703','725','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(730,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','271','724','Avances et acomptes versés sur immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(731,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','28','1352','Immobilisations financières',0,NULL,NULL,1,NULL,NULL),(732,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','280','731','Participations dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(733,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2800','732','Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(734,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2801','732','Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(735,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2808','732','Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(736,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2809','732','Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(737,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','281','731','Créances sur des entreprises liées',0,NULL,NULL,1,NULL,NULL),(738,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2810','737','Créances en compte',0,NULL,NULL,1,NULL,NULL),(739,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2811','737','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(740,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2812','737','Titres à revenu fixes',0,NULL,NULL,1,NULL,NULL),(741,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2817','737','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(742,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2819','737','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(744,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2820','743','Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(745,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2821','743','Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(746,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2828','743','Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(747,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2829','743','Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(749,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2830','748','Créances en compte',0,NULL,NULL,1,NULL,NULL),(750,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2831','748','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(751,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2832','748','Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(752,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2837','748','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(753,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2839','748','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(754,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','284','731','Autres actions et parts',0,NULL,NULL,1,NULL,NULL),(755,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2840','754','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(756,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2841','754','Montants non appelés',0,NULL,NULL,1,NULL,NULL),(757,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2848','754','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(758,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2849','754','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(759,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','285','731','Autres créances',0,NULL,NULL,1,NULL,NULL),(760,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2850','759','Créances en compte',0,NULL,NULL,1,NULL,NULL),(761,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2851','759','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(762,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2852','759','Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(763,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2857','759','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(764,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2859','759','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(765,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','288','731','Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(766,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2880','765','Téléphone, téléfax, télex',0,NULL,NULL,1,NULL,NULL),(767,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2881','765','Gaz',0,NULL,NULL,1,NULL,NULL),(768,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2882','765','Eau',0,NULL,NULL,1,NULL,NULL),(769,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2883','765','Electricité',0,NULL,NULL,1,NULL,NULL),(770,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2887','765','Autres cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(771,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29','1352','Créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(772,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','290','771','Créances commerciales',0,NULL,NULL,1,NULL,NULL),(773,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2900','772','Clients',0,NULL,NULL,1,NULL,NULL),(774,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29000','773','Créances en compte sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(776,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29002','773','Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(777,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29003','773','Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(778,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29004','773','Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(779,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29005','773','Créances sur les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(780,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2901','772','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(781,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29010','780','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(783,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29012','780','Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(784,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29013','780','Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(785,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29014','780','Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(786,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2905','772','Retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(787,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2906','772','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(788,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2907','772','Créances douteuses (à ventiler comme clients 2900)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(790,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','291','771','Autres créances',0,NULL,NULL,1,NULL,NULL),(791,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2910','790','Créances en compte',0,NULL,NULL,1,NULL,NULL),(792,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29100','791','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(794,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29102','791','Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(795,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2911','790','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(796,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29110','795','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(798,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29112','795','Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(800,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2917','790','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(801,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2919','790','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(802,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','30','1353','Approvisionnements - matières premières',0,NULL,NULL,1,NULL,NULL),(803,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','300','802','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(804,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','309','802','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(805,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31','1353','Approvsionnements et fournitures',0,NULL,NULL,1,NULL,NULL),(806,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','310','805','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(807,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3100','806','Matières d\'approvisionnement',0,NULL,NULL,1,NULL,NULL),(808,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3101','806','Energie, charbon, coke, mazout, essence, propane',0,NULL,NULL,1,NULL,NULL),(809,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3102','806','Produits d\'entretien',0,NULL,NULL,1,NULL,NULL),(810,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3103','806','Fournitures diverses et petit outillage',0,NULL,NULL,1,NULL,NULL),(811,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3104','806','Imprimés et fournitures de bureau',0,NULL,NULL,1,NULL,NULL),(812,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3105','806','Fournitures de services sociaux',0,NULL,NULL,1,NULL,NULL),(813,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3106','806','Emballages commerciaux',0,NULL,NULL,1,NULL,NULL),(814,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31060','813','Emballages perdus',0,NULL,NULL,1,NULL,NULL),(815,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31061','813','Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(816,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','319','805','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(817,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','32','1353','En cours de fabrication',0,NULL,NULL,1,NULL,NULL),(818,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','320','817','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(819,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3200','818','Produits semi-ouvrés',0,NULL,NULL,1,NULL,NULL),(820,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3201','818','Produits en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(821,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3202','818','Travaux en cours',0,NULL,NULL,1,NULL,NULL),(822,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3205','818','Déchets',0,NULL,NULL,1,NULL,NULL),(823,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3206','818','Rebuts',0,NULL,NULL,1,NULL,NULL),(824,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3209','818','Travaux en association momentanée',0,NULL,NULL,1,NULL,NULL),(825,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','329','817','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(826,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','33','1353','Produits finis',0,NULL,NULL,1,NULL,NULL),(827,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','330','826','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(828,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3300','827','Produits finis',0,NULL,NULL,1,NULL,NULL),(829,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','339','826','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(830,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','34','1353','Marchandises',0,NULL,NULL,1,NULL,NULL),(831,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','340','830','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(832,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3400','831','Groupe A',0,NULL,NULL,1,NULL,NULL),(833,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3401','831','Groupe B',0,NULL,NULL,1,NULL,NULL),(834,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3402','831','Groupe C',0,NULL,NULL,1,NULL,NULL),(835,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','349','830','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(836,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','35','1353','Immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(837,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','350','836','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(838,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3500','837','Immeuble A',0,NULL,NULL,1,NULL,NULL),(839,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3501','837','Immeuble B',0,NULL,NULL,1,NULL,NULL),(840,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3502','837','Immeuble C',0,NULL,NULL,1,NULL,NULL),(841,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','351','836','Immeubles construits en vue de leur revente',0,NULL,NULL,1,NULL,NULL),(842,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3510','841','Immeuble A',0,NULL,NULL,1,NULL,NULL),(843,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3511','841','Immeuble B',0,NULL,NULL,1,NULL,NULL),(844,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3512','841','Immeuble C',0,NULL,NULL,1,NULL,NULL),(845,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','359','836','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(846,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','36','1353','Acomptes versés sur achats pour stocks',0,NULL,NULL,1,NULL,NULL),(847,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','360','846','Acomptes versés (à ventiler éventuellement par catégorie)',0,NULL,NULL,1,NULL,NULL),(848,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','369','846','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(849,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','37','1353','Commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(850,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','370','849','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(851,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','371','849','Bénéfice pris en compte',0,NULL,NULL,1,NULL,NULL),(852,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','379','849','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(853,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','40','1354','Créances commerciales',0,NULL,NULL,1,NULL,NULL),(854,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','400','853','Clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(857,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','401','853','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(858,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4010','857','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(859,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4013','857','Effets à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(860,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4015','857','Effets à l\'escompte',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(862,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4020','861','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(864,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4022','861','Administrateurs et gérants d\'entreprise',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(866,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4030','865','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(868,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4032','865','Administrateurs et gérants de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(869,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','404','853','Produits à recevoir (factures à établir)',0,NULL,NULL,1,NULL,NULL),(870,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','405','853','Clients : retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(871,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','406','853','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(872,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','407','853','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(873,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','408','853','Compensation clients',0,NULL,NULL,1,NULL,NULL),(874,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','409','853','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(875,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41','1354','Autres créances',0,NULL,NULL,1,NULL,NULL),(876,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','410','875','Capital appelé, non versé',0,NULL,NULL,1,NULL,NULL),(877,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4100','876','Appels de fonds',0,NULL,NULL,1,NULL,NULL),(878,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4101','876','Actionnaires défaillants',0,NULL,NULL,1,NULL,NULL),(879,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','411','875','T.V.A. à récupérer',0,NULL,NULL,1,NULL,NULL),(880,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4110','879','T.V.A. due',0,NULL,NULL,1,NULL,NULL),(881,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4111','879','T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(882,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4112','879','Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(883,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4118','879','Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(884,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','412','875','Impôts et versements fiscaux à récupérer',0,NULL,NULL,1,NULL,NULL),(885,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4120','884','Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(886,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4125','884','Autres impôts belges',0,NULL,NULL,1,NULL,NULL),(887,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4128','884','Impôts étrangers',0,NULL,NULL,1,NULL,NULL),(888,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','414','875','Produits à recevoir',0,NULL,NULL,1,NULL,NULL),(889,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','416','875','Créances diverses',0,NULL,NULL,1,NULL,NULL),(890,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4160','889','Associés (compte d\'apport en société)',0,NULL,NULL,1,NULL,NULL),(891,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4161','889','Avances et prêts au personnel',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(893,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4163','889','Compte courant des administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(894,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4164','889','Créances sur sociétés apparentées',0,NULL,NULL,1,NULL,NULL),(895,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4166','889','Emballages et matériel à rendre',0,NULL,NULL,1,NULL,NULL),(896,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4167','889','Etat et établissements publics',0,NULL,NULL,1,NULL,NULL),(897,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41670','896','Subsides à recevoir',0,NULL,NULL,1,NULL,NULL),(898,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41671','896','Autres créances',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(900,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','417','875','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(901,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','418','875','Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(902,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','419','875','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(904,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','420','903','Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(905,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4200','904','Convertibles',0,NULL,NULL,1,NULL,NULL),(906,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4201','904','Non convertibles',0,NULL,NULL,1,NULL,NULL),(907,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','421','903','Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(908,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4210','907','Convertibles',0,NULL,NULL,1,NULL,NULL),(909,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4211','907','Non convertibles',0,NULL,NULL,1,NULL,NULL),(910,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','422','903','Dettes de location-financement et assimilées',0,NULL,NULL,1,NULL,NULL),(911,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4220','910','Financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(912,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4221','910','Financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(913,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','423','903','Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(914,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4230','913','Dettes en compte',0,NULL,NULL,1,NULL,NULL),(915,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4231','913','Promesses',0,NULL,NULL,1,NULL,NULL),(916,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4232','913','Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(917,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','424','903','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(918,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','425','903','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(919,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4250','918','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(920,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4251','918','Effets à payer',0,NULL,NULL,1,NULL,NULL),(921,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','426','903','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(922,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','429','903','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(923,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4290','922','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(924,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4291','922','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(925,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4292','922','Administrateurs, gérants, associés',0,NULL,NULL,1,NULL,NULL),(926,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4299','922','Autres dettes',0,NULL,NULL,1,NULL,NULL),(927,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','43','1354','Dettes financières',0,NULL,NULL,1,NULL,NULL),(928,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','430','927','Etablissements de crédit. Emprunts en compte à terme fixe',0,NULL,NULL,1,NULL,NULL),(929,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','431','927','Etablissements de crédit. Promesses',0,NULL,NULL,1,NULL,NULL),(930,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','432','927','Etablissements de crédit. Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(931,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','433','927','Etablissements de crédit. Dettes en compte courant',0,NULL,NULL,1,NULL,NULL),(932,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','439','927','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(933,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44','1354','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(934,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','440','933','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(935,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4400','934','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(936,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44000','935','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(937,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44001','935','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(938,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4401','934','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(939,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44010','938','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(940,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44011','938','Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(941,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44012','938','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(942,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4402','934','Dettes envers les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(943,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4403','934','Fournisseurs - retenues de garanties',0,NULL,NULL,1,NULL,NULL),(944,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','441','933','Effets à payer',0,NULL,NULL,1,NULL,NULL),(945,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4410','944','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(946,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44100','945','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(947,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44101','945','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(948,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4411','944','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(949,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44110','948','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(950,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44111','948','Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(951,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44112','948','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(952,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','444','933','Factures à recevoir',0,NULL,NULL,1,NULL,NULL),(953,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','446','933','Acomptes reçus',0,NULL,NULL,1,NULL,NULL),(954,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','448','933','Compensations fournisseurs',0,NULL,NULL,1,NULL,NULL),(955,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45','1354','Dettes fiscales, salariales et sociales',0,NULL,NULL,1,NULL,NULL),(956,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','450','955','Dettes fiscales estimées',0,NULL,NULL,1,NULL,NULL),(957,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4501','956','Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(958,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4505','956','Autres impôts en Belgique',0,NULL,NULL,1,NULL,NULL),(959,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4508','956','Impôts à l\'étranger',0,NULL,NULL,1,NULL,NULL),(960,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','451','955','T.V.A. à payer',0,NULL,NULL,1,NULL,NULL),(961,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4510','960','T.V.A. due',0,NULL,NULL,1,NULL,NULL),(962,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4511','960','T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(963,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4512','960','Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(964,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4518','960','Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(965,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','452','955','Impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(966,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4520','965','Autres impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(967,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4525','965','Autres impôts et taxes en Belgique',0,NULL,NULL,1,NULL,NULL),(968,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45250','967','Précompte immobilier',0,NULL,NULL,1,NULL,NULL),(969,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45251','967','Impôts communaux à payer',0,NULL,NULL,1,NULL,NULL),(970,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45252','967','Impôts provinciaux à payer',0,NULL,NULL,1,NULL,NULL),(971,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45253','967','Autres impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(972,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4528','965','Impôts et taxes à l\'étranger',0,NULL,NULL,1,NULL,NULL),(973,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','453','955','Précomptes retenus',0,NULL,NULL,1,NULL,NULL),(974,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4530','973','Précompte professionnel retenu sur rémunérations',0,NULL,NULL,1,NULL,NULL),(975,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4531','973','Précompte professionnel retenu sur tantièmes',0,NULL,NULL,1,NULL,NULL),(976,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4532','973','Précompte mobilier retenu sur dividendes attribués',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(978,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4538','973','Autres précomptes retenus',0,NULL,NULL,1,NULL,NULL),(979,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','454','955','Office National de la Sécurité Sociale',0,NULL,NULL,1,NULL,NULL),(980,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4540','979','Arriérés',0,NULL,NULL,1,NULL,NULL),(981,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4541','979','1er trimestre',0,NULL,NULL,1,NULL,NULL),(982,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4542','979','2ème trimestre',0,NULL,NULL,1,NULL,NULL),(983,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4543','979','3ème trimestre',0,NULL,NULL,1,NULL,NULL),(984,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4544','979','4ème trimestre',0,NULL,NULL,1,NULL,NULL),(985,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','455','955','Rémunérations',0,NULL,NULL,1,NULL,NULL),(986,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4550','985','Administrateurs, gérants et commissaires (non réviseurs)',0,NULL,NULL,1,NULL,NULL),(987,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4551','985','Direction',0,NULL,NULL,1,NULL,NULL),(988,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4552','985','Employés',0,NULL,NULL,1,NULL,NULL),(989,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4553','985','Ouvriers',0,NULL,NULL,1,NULL,NULL),(990,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','456','955','Pécules de vacances',0,NULL,NULL,1,NULL,NULL),(991,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4560','990','Direction',0,NULL,NULL,1,NULL,NULL),(992,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4561','990','Employés',0,NULL,NULL,1,NULL,NULL),(993,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4562','990','Ouvriers',0,NULL,NULL,1,NULL,NULL),(994,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','459','955','Autres dettes sociales',0,NULL,NULL,1,NULL,NULL),(995,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4590','994','Provision pour gratifications de fin d\'année',0,NULL,NULL,1,NULL,NULL),(996,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4591','994','Départs de personnel',0,NULL,NULL,1,NULL,NULL),(997,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4592','994','Oppositions sur rémunérations',0,NULL,NULL,1,NULL,NULL),(998,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4593','994','Assurances relatives au personnel',0,NULL,NULL,1,NULL,NULL),(999,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45930','998','Assurance loi',0,NULL,NULL,1,NULL,NULL),(1000,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45931','998','Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1001,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45932','998','Assurance groupe',0,NULL,NULL,1,NULL,NULL),(1002,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45933','998','Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1003,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4594','994','Caisse d\'assurances sociales pour travailleurs indépendants',0,NULL,NULL,1,NULL,NULL),(1004,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4597','994','Dettes et provisions sociales diverses',0,NULL,NULL,1,NULL,NULL),(1005,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','46','1354','Acomptes reçus sur commande',0,NULL,NULL,1,NULL,NULL),(1006,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','47','1354','Dettes découlant de l\'affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1007,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','470','1006','Dividendes et tantièmes d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1008,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','471','1006','Dividendes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1009,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','472','1006','Tantièmes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1010,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','473','1006','Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1011,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','48','4','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(1012,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','480','1011','Obligations et coupons échus',0,NULL,NULL,1,NULL,NULL),(1013,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','481','1011','Actionnaires - capital à rembourser',0,NULL,NULL,1,NULL,NULL),(1014,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','482','1011','Participation du personnel à payer',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1016,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','486','1011','Emballages et matériel consignés',0,NULL,NULL,1,NULL,NULL),(1017,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','488','1011','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(1018,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','489','1011','Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(1019,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49','1354','Comptes de régularisation et compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1020,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','490','1019','Charges à reporter (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1021,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','491','1019','Produits acquis',0,NULL,NULL,1,NULL,NULL),(1022,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4910','1021','Produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1023,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49100','1022','Ristournes et rabais à obtenir',0,NULL,NULL,1,NULL,NULL),(1024,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49101','1022','Commissions à obtenir',0,NULL,NULL,1,NULL,NULL),(1025,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49102','1022','Autres produits d\'exploitation (redevances par exemple)',0,NULL,NULL,1,NULL,NULL),(1026,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4911','1021','Produits financiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1028,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49111','1026','Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(1029,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','492','1019','Charges à imputer (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1030,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','493','1019','Produits à reporter',0,NULL,NULL,1,NULL,NULL),(1031,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4930','1030','Produits d\'exploitation à reporter',0,NULL,NULL,1,NULL,NULL),(1032,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4931','1030','Produits financiers à reporter',0,NULL,NULL,1,NULL,NULL),(1033,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','499','1019','Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(1034,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4990','1033','Compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1035,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4991','1033','Compte de répartition périodique des charges',0,NULL,NULL,1,NULL,NULL),(1036,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4999','1033','Transferts d\'exercice',0,NULL,NULL,1,NULL,NULL),(1037,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','50','1355','Actions propres',0,NULL,NULL,1,NULL,NULL),(1038,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','51','1355','Actions et parts',0,NULL,NULL,1,NULL,NULL),(1039,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','510','1038','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1040,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','511','1038','Montants non appelés',0,NULL,NULL,1,NULL,NULL),(1041,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','519','1038','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1042,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','52','1355','Titres à revenus fixes',0,NULL,NULL,1,NULL,NULL),(1043,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','520','1042','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1044,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','529','1042','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1045,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','53','1355','Dépots à terme',0,NULL,NULL,1,NULL,NULL),(1046,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','530','1045','De plus d\'un an',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1048,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','532','1045','d\'un mois au plus',0,NULL,NULL,1,NULL,NULL),(1049,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','539','1045','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1050,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','54','1355','Valeurs échues à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(1051,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','540','1050','Chèques à encaisser',0,NULL,NULL,1,NULL,NULL),(1052,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','541','1050','Coupons à encaisser',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(1054,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','550','1053','Comptes courants',0,NULL,NULL,1,NULL,NULL),(1055,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','551','1053','Chèques émis',0,NULL,NULL,1,NULL,NULL),(1056,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','559','1053','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1057,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','56','1355','Office des chèques postaux',0,NULL,NULL,1,NULL,NULL),(1058,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','560','1057','Compte courant',0,NULL,NULL,1,NULL,NULL),(1059,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','561','1057','Chèques émis',0,NULL,NULL,1,NULL,NULL),(1060,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','57','1355','Caisses',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(1062,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','578','1060','Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',0,NULL,NULL,1,NULL,NULL),(1063,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','58','1355','Virements internes',0,NULL,NULL,1,NULL,NULL),(1064,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','60','1356','Approvisionnements et marchandises',0,NULL,NULL,1,NULL,NULL),(1065,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','600','1064','Achats de matières premières',0,NULL,NULL,1,NULL,NULL),(1066,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','601','1064','Achats de fournitures',0,NULL,NULL,1,NULL,NULL),(1067,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','602','1064','Achats de services, travaux et études',0,NULL,NULL,1,NULL,NULL),(1068,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','603','1064','Sous-traitances générales',0,NULL,NULL,1,NULL,NULL),(1069,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','604','1064','Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(1070,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','605','1064','Achats d\'immeubles destinés à la revente',0,NULL,NULL,1,NULL,NULL),(1071,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','608','1064','Remises , ristournes et rabais obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(1072,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','609','1064','Variations de stocks',0,NULL,NULL,1,NULL,NULL),(1073,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6090','1072','De matières premières',0,NULL,NULL,1,NULL,NULL),(1074,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6091','1072','De fournitures',0,NULL,NULL,1,NULL,NULL),(1075,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6094','1072','De marchandises',0,NULL,NULL,1,NULL,NULL),(1076,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6095','1072','d\'immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1077,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61','1356','Services et biens divers',0,NULL,NULL,1,NULL,NULL),(1078,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','610','1077','Loyers et charges locatives',0,NULL,NULL,1,NULL,NULL),(1079,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6100','1078','Loyers divers',0,NULL,NULL,1,NULL,NULL),(1080,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6101','1078','Charges locatives (assurances, frais de confort,etc)',0,NULL,NULL,1,NULL,NULL),(1081,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','611','1077','Entretien et réparation (fournitures et prestations)',0,NULL,NULL,1,NULL,NULL),(1082,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','612','1077','Fournitures faites à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1083,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6120','1082','Eau, gaz, électricité, vapeur',0,NULL,NULL,1,NULL,NULL),(1084,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61200','1083','Eau',0,NULL,NULL,1,NULL,NULL),(1085,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61201','1083','Gaz',0,NULL,NULL,1,NULL,NULL),(1086,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61202','1083','Electricité',0,NULL,NULL,1,NULL,NULL),(1087,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61203','1083','Vapeur',0,NULL,NULL,1,NULL,NULL),(1088,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6121','1082','Téléphone, télégrammes, télex, téléfax, frais postaux',0,NULL,NULL,1,NULL,NULL),(1089,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61210','1088','Téléphone',0,NULL,NULL,1,NULL,NULL),(1090,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61211','1088','Télégrammes',0,NULL,NULL,1,NULL,NULL),(1091,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61212','1088','Télex et téléfax',0,NULL,NULL,1,NULL,NULL),(1092,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61213','1088','Frais postaux',0,NULL,NULL,1,NULL,NULL),(1093,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6122','1082','Livres, bibliothèque',0,NULL,NULL,1,NULL,NULL),(1094,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6123','1082','Imprimés et fournitures de bureau (si non comptabilisé au 601)',0,NULL,NULL,1,NULL,NULL),(1095,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','613','1077','Rétributions de tiers',0,NULL,NULL,1,NULL,NULL),(1096,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6130','1095','Redevances et royalties',0,NULL,NULL,1,NULL,NULL),(1097,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61300','1096','Redevances pour brevets, licences, marques et accessoires',0,NULL,NULL,1,NULL,NULL),(1098,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61301','1096','Autres redevances (procédés de fabrication)',0,NULL,NULL,1,NULL,NULL),(1099,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6131','1095','Assurances non relatives au personnel',0,NULL,NULL,1,NULL,NULL),(1100,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61310','1099','Assurance incendie',0,NULL,NULL,1,NULL,NULL),(1101,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61311','1099','Assurance vol',0,NULL,NULL,1,NULL,NULL),(1102,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61312','1099','Assurance autos',0,NULL,NULL,1,NULL,NULL),(1103,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61313','1099','Assurance crédit',0,NULL,NULL,1,NULL,NULL),(1104,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61314','1099','Assurances frais généraux',0,NULL,NULL,1,NULL,NULL),(1105,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6132','1095','Divers',0,NULL,NULL,1,NULL,NULL),(1106,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61320','1105','Commissions aux tiers',0,NULL,NULL,1,NULL,NULL),(1107,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61321','1105','Honoraires d\'avocats, d\'experts, etc',0,NULL,NULL,1,NULL,NULL),(1108,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61322','1105','Cotisations aux groupements professionnels',0,NULL,NULL,1,NULL,NULL),(1109,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61323','1105','Dons, libéralités, etc',0,NULL,NULL,1,NULL,NULL),(1110,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61324','1105','Frais de contentieux',0,NULL,NULL,1,NULL,NULL),(1111,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61325','1105','Publications légales',0,NULL,NULL,1,NULL,NULL),(1112,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6133','1095','Transports et déplacements',0,NULL,NULL,1,NULL,NULL),(1113,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61330','1112','Transports de personnel',0,NULL,NULL,1,NULL,NULL),(1114,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61331','1112','Voyages, déplacements et représentations',0,NULL,NULL,1,NULL,NULL),(1115,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6134','1095','Personnel intérimaire',0,NULL,NULL,1,NULL,NULL),(1116,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','614','1077','Annonces, publicité, propagande et documentation',0,NULL,NULL,1,NULL,NULL),(1117,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6140','1116','Annonces et insertions',0,NULL,NULL,1,NULL,NULL),(1118,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6141','1116','Catalogues et imprimés',0,NULL,NULL,1,NULL,NULL),(1119,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6142','1116','Echantillons',0,NULL,NULL,1,NULL,NULL),(1120,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6143','1116','Foires et expositions',0,NULL,NULL,1,NULL,NULL),(1121,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6144','1116','Primes',0,NULL,NULL,1,NULL,NULL),(1122,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6145','1116','Cadeaux à la clientèle',0,NULL,NULL,1,NULL,NULL),(1123,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6146','1116','Missions et réceptions',0,NULL,NULL,1,NULL,NULL),(1124,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6147','1116','Documentation',0,NULL,NULL,1,NULL,NULL),(1125,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','615','1077','Sous-traitants',0,NULL,NULL,1,NULL,NULL),(1126,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6150','1125','Sous-traitants pour activités propres',0,NULL,NULL,1,NULL,NULL),(1127,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6151','1125','Sous-traitants d\'associations momentanées (coparticipants)',0,NULL,NULL,1,NULL,NULL),(1128,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6152','1125','Quote-part bénéficiaire des coparticipants',0,NULL,NULL,1,NULL,NULL),(1129,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','617','1077','Personnel intérimaire et personnes mises à la disposition de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1130,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','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',0,NULL,NULL,1,NULL,NULL),(1131,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62','1356','Rémunérations, charges sociales et pensions',0,NULL,NULL,1,NULL,NULL),(1132,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','620','1131','Rémunérations et avantages sociaux directs',0,NULL,NULL,1,NULL,NULL),(1133,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6200','1132','Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1134,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6201','1132','Personnel de direction',0,NULL,NULL,1,NULL,NULL),(1135,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6202','1132','Employés',0,NULL,NULL,1,NULL,NULL),(1136,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6203','1132','Ouvriers',0,NULL,NULL,1,NULL,NULL),(1137,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6204','1132','Autres membres du personnel',0,NULL,NULL,1,NULL,NULL),(1138,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','621','1131','Cotisations patronales d\'assurances sociales',0,NULL,NULL,1,NULL,NULL),(1139,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6210','1138','Sur salaires',0,NULL,NULL,1,NULL,NULL),(1140,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6211','1138','Sur appointements et commissions',0,NULL,NULL,1,NULL,NULL),(1141,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','622','1131','Primes patronales pour assurances extralégales',0,NULL,NULL,1,NULL,NULL),(1142,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','623','1131','Autres frais de personnel',0,NULL,NULL,1,NULL,NULL),(1143,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6230','1142','Assurances du personnel',0,NULL,NULL,1,NULL,NULL),(1144,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62300','1143','Assurances loi, responsabilité civile, chemin du travail',0,NULL,NULL,1,NULL,NULL),(1145,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62301','1143','Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1146,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62302','1143','Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1147,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6231','1142','Charges sociales diverses',0,NULL,NULL,1,NULL,NULL),(1148,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62310','1147','Jours fériés payés',0,NULL,NULL,1,NULL,NULL),(1149,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62311','1147','Salaire hebdomadaire garanti',0,NULL,NULL,1,NULL,NULL),(1150,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62312','1147','Allocations familiales complémentaires',0,NULL,NULL,1,NULL,NULL),(1151,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6232','1142','Charges sociales des administrateurs, gérants et commissaires',0,NULL,NULL,1,NULL,NULL),(1152,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62320','1151','Allocations familiales complémentaires pour non salariés',0,NULL,NULL,1,NULL,NULL),(1153,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62321','1151','Lois sociales pour indépendants',0,NULL,NULL,1,NULL,NULL),(1154,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62322','1151','Divers',0,NULL,NULL,1,NULL,NULL),(1155,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','624','1131','Pensions de retraite et de survie',0,NULL,NULL,1,NULL,NULL),(1156,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6240','1155','Administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(1157,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6241','1155','Personnel',0,NULL,NULL,1,NULL,NULL),(1158,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','625','1131','Provision pour pécule de vacances',0,NULL,NULL,1,NULL,NULL),(1159,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6250','1158','Dotations',0,NULL,NULL,1,NULL,NULL),(1160,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6251','1158','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1161,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','63','1356','Amortissements, réductions de valeur et provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(1162,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','630','1161','Dotations aux amortissements et aux réductions de valeur sur immobilisations',0,NULL,NULL,1,NULL,NULL),(1163,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6300','1162','Dotations aux amortissements sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1164,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6301','1162','Dotations aux amortissements sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1165,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6302','1162','Dotations aux amortissements sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1166,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6308','1162','Dotations aux réductions de valeur sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1167,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6309','1162','Dotations aux réductions de valeur sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1168,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','631','1161','Réductions de valeur sur stocks',0,NULL,NULL,1,NULL,NULL),(1169,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6310','1168','Dotations',0,NULL,NULL,1,NULL,NULL),(1170,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6311','1168','Reprises',0,NULL,NULL,1,NULL,NULL),(1171,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','632','1161','Réductions de valeur sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1172,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6320','1171','Dotations',0,NULL,NULL,1,NULL,NULL),(1173,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6321','1171','Reprises',0,NULL,NULL,1,NULL,NULL),(1174,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','633','1161','Réductions de valeur sur créances commerciales à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1175,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6330','1174','Dotations',0,NULL,NULL,1,NULL,NULL),(1176,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6331','1174','Reprises',0,NULL,NULL,1,NULL,NULL),(1177,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','634','1161','Réductions de valeur sur créances commerciales à un an au plus',0,NULL,NULL,1,NULL,NULL),(1178,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6340','1177','Dotations',0,NULL,NULL,1,NULL,NULL),(1179,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6341','1177','Reprises',0,NULL,NULL,1,NULL,NULL),(1180,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','635','1161','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(1181,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6350','1180','Dotations',0,NULL,NULL,1,NULL,NULL),(1182,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6351','1180','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1183,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','636','11613','Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(1184,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6360','1183','Dotations',0,NULL,NULL,1,NULL,NULL),(1185,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6361','1183','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1186,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','637','1161','Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(1187,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6370','1186','Dotations',0,NULL,NULL,1,NULL,NULL),(1188,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6371','1186','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1189,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64','1356','Autres charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1190,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','640','1189','Charges fiscales d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1191,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6400','1190','Taxes et impôts directs',0,NULL,NULL,1,NULL,NULL),(1192,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64000','1191','Taxes sur autos et camions',0,NULL,NULL,1,NULL,NULL),(1193,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6401','1190','Taxes et impôts indirects',0,NULL,NULL,1,NULL,NULL),(1194,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64010','1193','Timbres fiscaux pris en charge par la firme',0,NULL,NULL,1,NULL,NULL),(1195,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64011','1193','Droits d\'enregistrement',0,NULL,NULL,1,NULL,NULL),(1196,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64012','1193','T.V.A. non déductible',0,NULL,NULL,1,NULL,NULL),(1197,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6402','1190','Impôts provinciaux et communaux',0,NULL,NULL,1,NULL,NULL),(1198,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64020','1197','Taxe sur la force motrice',0,NULL,NULL,1,NULL,NULL),(1199,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64021','1197','Taxe sur le personnel occupé',0,NULL,NULL,1,NULL,NULL),(1200,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6403','1190','Taxes diverses',0,NULL,NULL,1,NULL,NULL),(1201,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','641','1189','Moins-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1202,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','642','1189','Moins-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1203,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','643','1189','à 648 Charges d\'exploitations diverses',0,NULL,NULL,1,NULL,NULL),(1204,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','649','1189','Charges d\'exploitation portées à l\'actif au titre de restructuration',0,NULL,NULL,1,NULL,NULL),(1205,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','65','1356','Charges financières',0,NULL,NULL,1,NULL,NULL),(1206,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','650','1205','Charges des dettes',0,NULL,NULL,1,NULL,NULL),(1207,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6500','1206','Intérêts, commissions et frais afférents aux dettes',0,NULL,NULL,1,NULL,NULL),(1208,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6501','1206','Amortissements des agios et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(1209,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6502','1206','Autres charges de dettes',0,NULL,NULL,1,NULL,NULL),(1210,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6503','1206','Intérêts intercalaires portés à l\'actif',0,NULL,NULL,1,NULL,NULL),(1211,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','651','1205','Réductions de valeur sur actifs circulants',0,NULL,NULL,1,NULL,NULL),(1212,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6510','1211','Dotations',0,NULL,NULL,1,NULL,NULL),(1213,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6511','1211','Reprises',0,NULL,NULL,1,NULL,NULL),(1214,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','652','1205','Moins-values sur réalisation d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1215,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','653','1205','Charges d\'escompte de créances',0,NULL,NULL,1,NULL,NULL),(1216,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','654','1205','Différences de change',0,NULL,NULL,1,NULL,NULL),(1217,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','655','1205','Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1218,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','656','1205','Frais de banques, de chèques postaux',0,NULL,NULL,1,NULL,NULL),(1219,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','657','1205','Commissions sur ouvertures de crédit, cautions et avals',0,NULL,NULL,1,NULL,NULL),(1220,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','658','1205','Frais de vente des titres',0,NULL,NULL,1,NULL,NULL),(1221,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','66','1356','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1222,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','660','1221','Amortissements et réductions de valeur exceptionnels',0,NULL,NULL,1,NULL,NULL),(1223,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6600','1222','Sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1224,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6601','1222','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1225,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6602','1222','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1226,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','661','1221','Réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1227,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','662','1221','Provisions pour risques et charges exceptionnels',0,NULL,NULL,1,NULL,NULL),(1228,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','663','1221','Moins-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1229,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6630','1228','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1230,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6631','1228','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1231,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6632','1228','Sur immobilisations détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(1232,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6633','1228','Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1233,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6634','1228','Sur immeubles acquis ou construits en vue de la revente',0,NULL,NULL,1,NULL,NULL),(1234,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','664','1221','à 668 Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1235,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','664','1221','Pénalités et amendes diverses',0,NULL,NULL,1,NULL,NULL),(1236,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','665','1221','Différence de charge',0,NULL,NULL,1,NULL,NULL),(1237,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','669','1221','Charges exceptionnelles transférées à l\'actif en frais de restructuration',0,NULL,NULL,1,NULL,NULL),(1238,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','67','1356','Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(1239,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','670','1238','Impôts belges sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1240,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6700','1239','Impôts et précomptes dus ou versés',0,NULL,NULL,1,NULL,NULL),(1241,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6701','1239','Excédent de versements d\'impôts et précomptes porté à l\'actif',0,NULL,NULL,1,NULL,NULL),(1242,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6702','1239','Charges fiscales estimées',0,NULL,NULL,1,NULL,NULL),(1243,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','671','1238','Impôts belges sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1244,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6710','1243','Suppléments d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1245,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6711','1243','Suppléments d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1246,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6712','1243','Provisions fiscales constituées',0,NULL,NULL,1,NULL,NULL),(1247,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','672','1238','Impôts étrangers sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1248,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','673','1238','Impôts étrangers sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1249,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','68','1356','Transferts aux réserves immunisées',0,NULL,NULL,1,NULL,NULL),(1250,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','69','1356','Affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1251,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','690','1250','Perte reportée de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1252,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','691','1250','Dotation à la réserve légale',0,NULL,NULL,1,NULL,NULL),(1253,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','692','1250','Dotation aux autres réserves',0,NULL,NULL,1,NULL,NULL),(1254,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','693','1250','Bénéfice à reporter',0,NULL,NULL,1,NULL,NULL),(1255,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','694','1250','Rémunération du capital',0,NULL,NULL,1,NULL,NULL),(1256,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','695','1250','Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1257,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','696','1250','Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1258,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','70','1357','Chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(1260,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','700','1258','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1261,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7000','1260','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1262,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7001','1260','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1263,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7002','1260','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1264,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','701','1258','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1265,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7010','1264','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1266,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7011','1264','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1267,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7012','1264','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1268,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','702','1258','Ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1269,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7020','1268','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1270,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7021','1268','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1271,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7022','1268','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1272,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','703','1258','Ventes d\'emballages récupérables',0,NULL,NULL,1,NULL,NULL),(1273,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','704','1258','Facturations des travaux en cours (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(1274,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','705','1258','Prestations de services',0,NULL,NULL,1,NULL,NULL),(1275,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7050','1274','Prestations de services en Belgique',0,NULL,NULL,1,NULL,NULL),(1276,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7051','1274','Prestations de services dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1277,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7052','1274','Prestations de services en vue de l\'exportation',0,NULL,NULL,1,NULL,NULL),(1278,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','706','1258','Pénalités et dédits obtenus par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1279,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','708','1258','Remises, ristournes et rabais accordés',0,NULL,NULL,1,NULL,NULL),(1280,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7080','1279','Sur ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1281,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7081','1279','Sur ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1282,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7082','1279','Sur ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1283,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7083','1279','Sur prestations de services',0,NULL,NULL,1,NULL,NULL),(1284,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7084','1279','Mali sur travaux facturés aux associations momentanées',0,NULL,NULL,1,NULL,NULL),(1285,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71','1357','Variation des stocks et des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1286,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','712','1285','Des en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(1287,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','713','1285','Des produits finis',0,NULL,NULL,1,NULL,NULL),(1288,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','715','1285','Des immeubles construits destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1289,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','717','1285','Des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1290,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7170','1289','Commandes en cours - Coût de revient',0,NULL,NULL,1,NULL,NULL),(1291,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71700','1290','Coût des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1292,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71701','1290','Coût des travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1293,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7171','1289','Bénéfices portés en compte sur commandes en cours',0,NULL,NULL,1,NULL,NULL),(1294,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71710','1293','Sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1295,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71711','1293','Sur travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1296,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','72','1357','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(1297,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','720','1296','En frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1298,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','721','1296','En immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1299,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','722','1296','En immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1300,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','723','1296','En immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(1301,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','74','1357','Autres produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1302,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','740','1301','Subsides d\'exploitation et montants compensatoires',0,NULL,NULL,1,NULL,NULL),(1303,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','741','1301','Plus-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1304,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','742','1301','Plus-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1305,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','743','1301','à 749 Produits d\'exploitation divers',0,NULL,NULL,1,NULL,NULL),(1306,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','743','1301','Produits de services exploités dans l\'intérêt du personnel',0,NULL,NULL,1,NULL,NULL),(1307,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','744','1301','Commissions et courtages',0,NULL,NULL,1,NULL,NULL),(1308,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','745','1301','Redevances pour brevets et licences',0,NULL,NULL,1,NULL,NULL),(1309,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','746','1301','Prestations de services (transports, études, etc)',0,NULL,NULL,1,NULL,NULL),(1310,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','747','1301','Revenus des immeubles affectés aux activités non professionnelles',0,NULL,NULL,1,NULL,NULL),(1311,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','748','1301','Locations diverses à caractère professionnel',0,NULL,NULL,1,NULL,NULL),(1312,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','749','1301','Produits divers',0,NULL,NULL,1,NULL,NULL),(1313,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7490','1312','Bonis sur reprises d\'emballages consignés',0,NULL,NULL,1,NULL,NULL),(1314,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7491','1312','Bonis sur travaux en associations momentanées',0,NULL,NULL,1,NULL,NULL),(1315,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','75','1357','Produits financiers',0,NULL,NULL,1,NULL,NULL),(1316,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','750','1315','Produits des immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1317,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7500','1316','Revenus des actions',0,NULL,NULL,1,NULL,NULL),(1318,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7501','1316','Revenus des obligations',0,NULL,NULL,1,NULL,NULL),(1319,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7502','1316','Revenus des créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1320,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','751','1315','Produits des actifs circulants',0,NULL,NULL,1,NULL,NULL),(1321,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','752','1315','Plus-values sur réalisations d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1322,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','753','1315','Subsides en capital et en intérêts',0,NULL,NULL,1,NULL,NULL),(1323,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','754','1315','Différences de change',0,NULL,NULL,1,NULL,NULL),(1324,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','755','1315','Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1325,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','756','1315','à 759 Produits financiers divers',0,NULL,NULL,1,NULL,NULL),(1326,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','756','1315','Produits des autres créances',0,NULL,NULL,1,NULL,NULL),(1327,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','757','1315','Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(1328,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','76','1357','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1329,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','760','1328','Reprises d\'amortissements et de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(1330,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7600','1329','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1331,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7601','1329','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1332,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','761','1328','Reprises de réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1333,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','762','1328','Reprises de provisions pour risques et charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1334,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','763','1328','Plus-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1335,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7630','1334','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1336,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7631','1334','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1337,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7632','1334','Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1338,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','764','1328','Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1339,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','77','1357','Régularisations d\'impôts et reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1340,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','771','1339','Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(1341,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7710','1340','Régularisations d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1342,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7711','1340','Régularisations d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1343,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7712','1340','Reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1344,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','773','1339','Impôts étrangers sur le résultat',0,NULL,NULL,1,NULL,NULL),(1345,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','79','1357','Affectation aux résultats',0,NULL,NULL,1,NULL,NULL),(1346,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','790','1345','Bénéfice reporté de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1347,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','791','1345','Prélèvement sur le capital et les primes d\'émission',0,NULL,NULL,1,NULL,NULL),(1348,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','792','1345','Prélèvement sur les réserves',0,NULL,NULL,1,NULL,NULL),(1349,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','793','1345','Perte à reporter',0,NULL,NULL,1,NULL,NULL),(1350,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','794','1345','Intervention d\'associés (ou du propriétaire) dans la perte',0,NULL,NULL,1,NULL,NULL),(1351,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1352,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1353,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1354,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1355,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1356,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1357,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(1401,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1402,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1403,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1404,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1405,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1406,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1407,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(1501,1,NULL,'2017-02-20 10:46:43','PCG99-BASE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1502,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1503,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1504,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1505,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1506,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1507,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(4001,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','FINANCIACION','XXXXXX','1','0','Financiación básica',0,NULL,NULL,1,NULL,NULL),(4002,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','ACTIVO','XXXXXX','2','0','Activo no corriente',0,NULL,NULL,1,NULL,NULL),(4003,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','EXISTENCIAS','XXXXXX','3','0','Existencias',0,NULL,NULL,1,NULL,NULL),(4004,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4','0','Acreedores y deudores por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4005,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5','0','Cuentas financieras',0,NULL,NULL,1,NULL,NULL),(4006,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6','0','Compras y gastos',0,NULL,NULL,1,NULL,NULL),(4007,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7','0','Ventas e ingresos',0,NULL,NULL,1,NULL,NULL),(4008,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','10','4001','CAPITAL',0,NULL,NULL,1,NULL,NULL),(4009,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','100','4008','Capital social',0,NULL,NULL,1,NULL,NULL),(4010,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','101','4008','Fondo social',0,NULL,NULL,1,NULL,NULL),(4011,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','CAPITAL','102','4008','Capital',0,NULL,NULL,1,NULL,NULL),(4012,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','103','4008','Socios por desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(4013,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1030','4012','Socios por desembolsos no exigidos capital social',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4015,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','104','4008','Socios por aportaciones no dineradas pendientes',0,NULL,NULL,1,NULL,NULL),(4016,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1040','4015','Socios por aportaciones no dineradas pendientes capital social',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4018,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','108','4008','Acciones o participaciones propias en situaciones especiales',0,NULL,NULL,1,NULL,NULL),(4019,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','109','4008','Acciones o participaciones propias para reducción de capital',0,NULL,NULL,1,NULL,NULL),(4020,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','11','4001','Reservas y otros instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4021,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','110','4020','Prima de emisión o asunción',0,NULL,NULL,1,NULL,NULL),(4022,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','111','4020','Otros instrumentos de patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4023,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1110','4022','Patrimonio neto por emisión de instrumentos financieros compuestos',0,NULL,NULL,1,NULL,NULL),(4024,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1111','4022','Resto de instrumentos de patrimoio neto',0,NULL,NULL,1,NULL,NULL),(4025,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','112','4020','Reserva legal',0,NULL,NULL,1,NULL,NULL),(4026,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','113','4020','Reservas voluntarias',0,NULL,NULL,1,NULL,NULL),(4027,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','114','4020','Reservas especiales',0,NULL,NULL,1,NULL,NULL),(4028,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1140','4027','Reservas para acciones o participaciones de la sociedad dominante',0,NULL,NULL,1,NULL,NULL),(4029,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1141','4027','Reservas estatutarias',0,NULL,NULL,1,NULL,NULL),(4030,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1142','4027','Reservas por capital amortizado',0,NULL,NULL,1,NULL,NULL),(4031,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1143','4027','Reservas por fondo de comercio',0,NULL,NULL,1,NULL,NULL),(4032,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1144','4028','Reservas por acciones propias aceptadas en garantía',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4034,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','118','4020','Aportaciones de socios o propietarios',0,NULL,NULL,1,NULL,NULL),(4035,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','119','4020','Diferencias por ajuste del capital a euros',0,NULL,NULL,1,NULL,NULL),(4036,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','12','4001','Resultados pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4037,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','120','4036','Remanente',0,NULL,NULL,1,NULL,NULL),(4038,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','121','4036','Resultados negativos de ejercicios anteriores',0,NULL,NULL,1,NULL,NULL),(4039,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','129','4036','Resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4040,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','13','4001','Subvenciones, donaciones y ajustes por cambio de valor',0,NULL,NULL,1,NULL,NULL),(4041,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','130','4040','Subvenciones oficiales de capital',0,NULL,NULL,1,NULL,NULL),(4042,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','131','4040','Donaciones y legados de capital',0,NULL,NULL,1,NULL,NULL),(4043,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','132','4040','Otras subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4045,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','134','4040','Operaciones de cobertura',0,NULL,NULL,1,NULL,NULL),(4046,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1340','4045','Cobertura de flujos de efectivo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4048,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','135','4040','Diferencias de conversión',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4050,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','137','4040','Ingresos fiscales a distribuir en varios ejercicios',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4053,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','14','4001','Provisiones',0,NULL,NULL,1,NULL,NULL),(4054,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','141','4053','Provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4055,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','142','4053','Provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4057,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','145','4053','Provisión para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4058,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','15','4001','Deudas a largo plazo con características especiales',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4061,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1533','4060','Desembolsos no exigidos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4062,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1534','4060','Desembolsos no exigidos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4063,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1535','4060','Desembolsos no exigidos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4064,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1536','4060','Otros desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4066,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1543','4065','Aportaciones no dinerarias pendientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4067,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1544','4065','Aportaciones no dinerarias pendientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4068,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1545','4065','Aportaciones no dinerarias pendientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4069,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1546','4065','Otras aportaciones no dinerarias pendientes',0,NULL,NULL,1,NULL,NULL),(4070,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','16','4001','Deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4075,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','161','4070','Proveedores de inmovilizado a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4076,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1613','4075','Proveedores de inmovilizado a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4077,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1614','4075','Proveedores de inmovilizado a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4078,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1615','4075','Proveedores de inmovilizado a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4079,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','162','4070','Acreedores por arrendamiento financiero a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4081,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1624','4080','Acreedores por arrendamiento financiero a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4083,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','163','4070','Otras deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4084,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1633','4083','Otras deudas a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4085,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1634','4083','Otras deudas a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4086,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1635','4083','Otras deudas a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4088,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','170','4087','Deudas a largo plazo con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4089,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','171','4087','Deudas a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4091,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','173','4087','Proveedores de inmovilizado a largo plazo',0,NULL,NULL,1,NULL,NULL),(4092,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','174','4087','Acreedores por arrendamiento financiero a largo plazo',0,NULL,NULL,1,NULL,NULL),(4093,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','175','4087','Efectos a pagar a largo plazo',0,NULL,NULL,1,NULL,NULL),(4094,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','176','4087','Pasivos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4095,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','177','4087','Obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4096,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','179','4087','Deudas representadas en otros valores negociables',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4098,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','180','4097','Fianzas recibidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4100,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','185','4097','Depositos recibidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4101,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','19','4001','Situaciones transitorias de financiación',0,NULL,NULL,1,NULL,NULL),(4102,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','190','4101','Acciones o participaciones emitidas',0,NULL,NULL,1,NULL,NULL),(4103,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','192','4101','Suscriptores de acciones',0,NULL,NULL,1,NULL,NULL),(4104,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','194','4101','Capital emitido pendiente de inscripción',0,NULL,NULL,1,NULL,NULL),(4105,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','195','4101','Acciones o participaciones emitidas consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4106,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','197','4101','Suscriptores de acciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4108,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','20','4002','Inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4109,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','200','4108','Investigación',0,NULL,NULL,1,NULL,NULL),(4110,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','201','4108','Desarrollo',0,NULL,NULL,1,NULL,NULL),(4111,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','202','4108','Concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4112,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','203','4108','Propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4113,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','205','4108','Derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4114,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','206','4108','Aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4115,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','209','4108','Anticipos para inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4116,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','21','4002','Inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4117,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','210','4116','Terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4118,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','211','4116','Construcciones',0,NULL,NULL,1,NULL,NULL),(4119,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','212','4116','Instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4120,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','213','4116','Maquinaria',0,NULL,NULL,1,NULL,NULL),(4121,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','214','4116','Utillaje',0,NULL,NULL,1,NULL,NULL),(4122,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','215','4116','Otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4123,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','216','4116','Mobiliario',0,NULL,NULL,1,NULL,NULL),(4124,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','217','4116','Equipos para procesos de información',0,NULL,NULL,1,NULL,NULL),(4125,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','218','4116','Elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4126,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','219','4116','Otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4127,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','22','4002','Inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4128,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','220','4127','Inversiones en terreons y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4129,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','221','4127','Inversiones en construcciones',0,NULL,NULL,1,NULL,NULL),(4130,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','23','4002','Inmovilizaciones materiales en curso',0,NULL,NULL,1,NULL,NULL),(4131,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','230','4130','Adaptación de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4132,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','231','4130','Construcciones en curso',0,NULL,NULL,1,NULL,NULL),(4133,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','232','4130','Instalaciones técnicas en montaje',0,NULL,NULL,1,NULL,NULL),(4134,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','233','4130','Maquinaria en montaje',0,NULL,NULL,1,NULL,NULL),(4135,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','237','4130','Equipos para procesos de información en montaje',0,NULL,NULL,1,NULL,NULL),(4136,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','239','4130','Anticipos para inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4137,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','24','4002','Inversiones financieras a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4138,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','240','4137','Participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4139,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2403','4138','Participaciones a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4140,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2404','4138','Participaciones a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4141,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2405','4138','Participaciones a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4146,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','242','4137','Créditos a largo plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4147,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2423','4146','Créditos a largo plazo a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4148,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2424','4146','Créditos a largo plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4149,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2425','4146','Créditos a largo plazo a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4154,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','25','4002','Otras inversiones financieras a largo plazo',0,NULL,NULL,1,NULL,NULL),(4155,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','250','4154','Inversiones financieras a largo plazo en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4156,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','251','4154','Valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4157,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','252','4154','Créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4159,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','254','4154','Créditos a largo plazo al personal',0,NULL,NULL,1,NULL,NULL),(4160,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','255','4154','Activos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4161,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','258','4154','Imposiciones a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4163,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','26','4002','Fianzas y depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4164,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','260','4163','Fianzas constituidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(4165,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','261','4163','Depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4166,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','28','4002','Amortización acumulada del inmovilizado',0,NULL,NULL,1,NULL,NULL),(4167,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','280','4166','Amortización acumulado del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4168,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2800','4167','Amortización acumulada de investigación',0,NULL,NULL,1,NULL,NULL),(4169,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2801','4167','Amortización acumulada de desarrollo',0,NULL,NULL,1,NULL,NULL),(4170,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2802','4167','Amortización acumulada de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4171,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2803','4167','Amortización acumulada de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4172,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2805','4167','Amortización acumulada de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4173,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2806','4167','Amortización acumulada de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4174,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','281','4166','Amortización acumulado del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4175,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2811','4174','Amortización acumulada de construcciones',0,NULL,NULL,1,NULL,NULL),(4176,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2812','4174','Amortización acumulada de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4177,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2813','4174','Amortización acumulada de maquinaria',0,NULL,NULL,1,NULL,NULL),(4178,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2814','4174','Amortización acumulada de utillaje',0,NULL,NULL,1,NULL,NULL),(4179,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2815','4174','Amortización acumulada de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4180,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2816','4174','Amortización acumulada de mobiliario',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4182,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2818','4174','Amortización acumulada de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4183,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2819','4175','Amortización acumulada de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4184,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','282','4166','Amortización acumulada de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4185,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','29','4002','Deterioro de valor de activos no corrientes',0,NULL,NULL,1,NULL,NULL),(4186,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','290','4185','Deterioro de valor del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4187,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2900','4186','Deterioro de valor de investigación',0,NULL,NULL,1,NULL,NULL),(4188,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2901','4186','Deterioro de valor de desarrollo',0,NULL,NULL,1,NULL,NULL),(4189,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2902','4186','Deterioro de valor de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4190,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2903','4186','Deterioro de valor de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4191,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2905','4186','Deterioro de valor de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4192,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2906','4186','Deterioro de valor de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4193,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','291','4185','Deterioro de valor del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4194,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2910','4193','Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4195,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2911','4193','Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(4196,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2912','4193','Deterioro de valor de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4197,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2913','4193','Deterioro de valor de maquinaria',0,NULL,NULL,1,NULL,NULL),(4198,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2914','4193','Deterioro de valor de utillajes',0,NULL,NULL,1,NULL,NULL),(4199,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2915','4194','Deterioro de valor de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4200,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2916','4194','Deterioro de valor de mobiliario',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4202,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2918','4194','Deterioro de valor de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4203,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2919','4194','Deterioro de valor de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4204,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','292','4185','Deterioro de valor de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4205,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2920','4204','Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4206,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2921','4204','Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4221,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','298','4185','Deterioro de valor de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4222,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','30','4003','Comerciales',0,NULL,NULL,1,NULL,NULL),(4223,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','300','4222','Mercaderías A',0,NULL,NULL,1,NULL,NULL),(4224,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','301','4222','Mercaderías B',0,NULL,NULL,1,NULL,NULL),(4225,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','31','4003','Materias primas',0,NULL,NULL,1,NULL,NULL),(4226,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','310','4225','Materias primas A',0,NULL,NULL,1,NULL,NULL),(4227,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','311','4225','Materias primas B',0,NULL,NULL,1,NULL,NULL),(4228,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','32','4003','Otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4229,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','320','4228','Elementos y conjuntos incorporables',0,NULL,NULL,1,NULL,NULL),(4230,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','321','4228','Combustibles',0,NULL,NULL,1,NULL,NULL),(4231,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','322','4228','Repuestos',0,NULL,NULL,1,NULL,NULL),(4232,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','325','4228','Materiales diversos',0,NULL,NULL,1,NULL,NULL),(4233,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','326','4228','Embalajes',0,NULL,NULL,1,NULL,NULL),(4234,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','327','4228','Envases',0,NULL,NULL,1,NULL,NULL),(4235,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','328','4229','Material de oficina',0,NULL,NULL,1,NULL,NULL),(4236,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','33','4003','Productos en curso',0,NULL,NULL,1,NULL,NULL),(4237,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','330','4236','Productos en curos A',0,NULL,NULL,1,NULL,NULL),(4238,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','331','4236','Productos en curso B',0,NULL,NULL,1,NULL,NULL),(4239,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','34','4003','Productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4240,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','340','4239','Productos semiterminados A',0,NULL,NULL,1,NULL,NULL),(4241,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','341','4239','Productos semiterminados B',0,NULL,NULL,1,NULL,NULL),(4242,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','35','4003','Productos terminados',0,NULL,NULL,1,NULL,NULL),(4243,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','350','4242','Productos terminados A',0,NULL,NULL,1,NULL,NULL),(4244,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','351','4242','Productos terminados B',0,NULL,NULL,1,NULL,NULL),(4245,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','36','4003','Subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4246,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','360','4245','Subproductos A',0,NULL,NULL,1,NULL,NULL),(4247,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','361','4245','Subproductos B',0,NULL,NULL,1,NULL,NULL),(4248,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','365','4245','Residuos A',0,NULL,NULL,1,NULL,NULL),(4249,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','366','4245','Residuos B',0,NULL,NULL,1,NULL,NULL),(4250,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','368','4245','Materiales recuperados A',0,NULL,NULL,1,NULL,NULL),(4251,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','369','4245','Materiales recuperados B',0,NULL,NULL,1,NULL,NULL),(4252,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','39','4003','Deterioro de valor de las existencias',0,NULL,NULL,1,NULL,NULL),(4253,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','390','4252','Deterioro de valor de las mercaderías',0,NULL,NULL,1,NULL,NULL),(4254,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','391','4252','Deterioro de valor de las materias primas',0,NULL,NULL,1,NULL,NULL),(4255,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','392','4252','Deterioro de valor de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4256,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','393','4252','Deterioro de valor de los productos en curso',0,NULL,NULL,1,NULL,NULL),(4257,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','394','4252','Deterioro de valor de los productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4258,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','395','4252','Deterioro de valor de los productos terminados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4260,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','40','4004','Proveedores',0,NULL,NULL,1,NULL,NULL),(4261,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','400','4260','Proveedores',0,NULL,NULL,1,NULL,NULL),(4262,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4000','4261','Proveedores euros',0,NULL,NULL,1,NULL,NULL),(4263,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4004','4261','Proveedores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4264,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4009','4261','Proveedores facturas pendientes de recibir o formalizar',0,NULL,NULL,1,NULL,NULL),(4265,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','401','4260','Proveedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4266,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','403','4260','Proveedores empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4267,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4030','4266','Proveedores empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4268,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4031','4266','Efectos comerciales a pagar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4269,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4034','4266','Proveedores empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4272,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','404','4260','Proveedores empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4273,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','405','4260','Proveedores otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4274,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','406','4260','Envases y embalajes a devolver a proveedores',0,NULL,NULL,1,NULL,NULL),(4275,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','407','4260','Anticipos a proveedores',0,NULL,NULL,1,NULL,NULL),(4276,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','41','4004','Acreedores varios',0,NULL,NULL,1,NULL,NULL),(4277,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','410','4276','Acreedores por prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4278,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4100','4277','Acreedores por prestaciones de servicios euros',0,NULL,NULL,1,NULL,NULL),(4279,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4104','4277','Acreedores por prestaciones de servicios moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4281,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','411','4276','Acreedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4282,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','419','4276','Acreedores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4283,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','43','4004','Clientes',0,NULL,NULL,1,NULL,NULL),(4284,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','430','4283','Clientes',0,NULL,NULL,1,NULL,NULL),(4285,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4300','4284','Clientes euros',0,NULL,NULL,1,NULL,NULL),(4286,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4304','4284','Clientes moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4287,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4309','4284','Clientes facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4288,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','431','4283','Clientes efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4289,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4310','4288','Efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4290,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4311','4288','Efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4291,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4312','4288','Efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4292,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4315','4288','Efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4293,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','432','4283','Clientes operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4294,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','433','4283','Clientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4295,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4330','4294','Clientes empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4296,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4331','4294','Efectos comerciales a cobrar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4297,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4332','4294','Clientes empresas del grupo operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4298,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4334','4294','Clientes empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4299,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4336','4294','Clientes empresas del grupo dudoso cobro',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4301,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4339','4294','Clientes empresas del grupo facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4302,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','434','4283','Clientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4303,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','435','4283','Clientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4304,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','436','4283','Clientes de dudoso cobro',0,NULL,NULL,1,NULL,NULL),(4305,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','437','4283','Envases y embalajes a devolver por clientes',0,NULL,NULL,1,NULL,NULL),(4306,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','438','4283','Anticipos de clientes',0,NULL,NULL,1,NULL,NULL),(4307,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','44','4004','Deudores varios',0,NULL,NULL,1,NULL,NULL),(4308,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','440','4307','Deudores',0,NULL,NULL,1,NULL,NULL),(4309,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4400','4308','Deudores euros',0,NULL,NULL,1,NULL,NULL),(4310,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4404','4308','Deudores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4311,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4409','4308','Deudores facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4312,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','441','4307','Deudores efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4313,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4410','4312','Deudores efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4314,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4411','4312','Deudores efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4315,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4412','4312','Deudores efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4316,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4415','4312','Deudores efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4317,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','446','4307','Deudores de dusoso cobro',0,NULL,NULL,1,NULL,NULL),(4318,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','449','4307','Deudores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4319,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','46','4004','Personal',0,NULL,NULL,1,NULL,NULL),(4320,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','460','4319','Anticipos de renumeraciones',0,NULL,NULL,1,NULL,NULL),(4321,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','465','4319','Renumeraciones pendientes de pago',0,NULL,NULL,1,NULL,NULL),(4322,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','47','4004','Administraciones Públicas',0,NULL,NULL,1,NULL,NULL),(4323,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','470','4322','Hacienda Pública deudora por diversos conceptos',0,NULL,NULL,1,NULL,NULL),(4324,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4700','4323','Hacienda Pública deudora por IVA',0,NULL,NULL,1,NULL,NULL),(4325,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4708','4323','Hacienda Pública deudora por subvenciones concedidas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4327,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','471','4322','Organismos de la Seguridad Social deudores',0,NULL,NULL,1,NULL,NULL),(4328,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','472','4322','Hacienda Pública IVA soportado',0,NULL,NULL,1,NULL,NULL),(4329,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','473','4322','Hacienda Pública retenciones y pagos a cuenta',0,NULL,NULL,1,NULL,NULL),(4330,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','474','4322','Activos por impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4331,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4740','4330','Activos por diferencias temporarias deducibles',0,NULL,NULL,1,NULL,NULL),(4332,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4742','4330','Derechos por deducciones y bonificaciones pendientes de aplicar',0,NULL,NULL,1,NULL,NULL),(4333,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4745','4330','Crédito por pérdidasa compensar del ejercicio',0,NULL,NULL,1,NULL,NULL),(4334,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','475','4322','Hacienda Pública acreedora por conceptos fiscales',0,NULL,NULL,1,NULL,NULL),(4335,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4750','4334','Hacienda Pública acreedora por IVA',0,NULL,NULL,1,NULL,NULL),(4336,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4751','4334','Hacienda Pública acreedora por retenciones practicadas',0,NULL,NULL,1,NULL,NULL),(4337,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4752','4334','Hacienda Pública acreedora por impuesto sobre sociedades',0,NULL,NULL,1,NULL,NULL),(4338,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4758','4334','Hacienda Pública acreedora por subvenciones a integrar',0,NULL,NULL,1,NULL,NULL),(4339,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','476','4322','Organismos de la Seguridad Social acreedores',0,NULL,NULL,1,NULL,NULL),(4340,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','477','4322','Hacienda Pública IVA repercutido',0,NULL,NULL,1,NULL,NULL),(4341,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','479','4322','Pasivos por diferencias temporarias imponibles',0,NULL,NULL,1,NULL,NULL),(4342,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','48','4004','Ajustes por periodificación',0,NULL,NULL,1,NULL,NULL),(4343,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','480','4342','Gastos anticipados',0,NULL,NULL,1,NULL,NULL),(4344,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','485','4342','Ingresos anticipados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4351,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','499','4345','Provisiones por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4352,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4994','4351','Provisión para contratos anerosos',0,NULL,NULL,1,NULL,NULL),(4353,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4999','4351','Provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4355,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','500','4354','Obligaciones y bonos a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4360,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','509','4354','Valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4361,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5090','4360','Obligaciones y bonos amortizados',0,NULL,NULL,1,NULL,NULL),(4362,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5095','4360','Otros valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4363,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','51','4005','Deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4368,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','511','4363','Proveedores de inmovilizado a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4370,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5114','4368','Proveedores de inmovilizado a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4376,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','513','4363','Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4378,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5134','4376','Otras deudas a corto plazo con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4379,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5135','4376','Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4380,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','514','4363','Intereses a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4381,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5143','4380','Intereses a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4382,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5144','4380','Intereses a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4383,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5145','4380','Intereses deudas a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4387,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5201','4385','Deudas a corto plazo por crédito dispuesto',0,NULL,NULL,1,NULL,NULL),(4388,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5208','4385','Deudas por efectos descontados',0,NULL,NULL,1,NULL,NULL),(4389,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5209','4385','Deudas por operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4390,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','521','4384','Deudas a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4392,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','523','4384','Proveedores de inmovilizado a corto plazo',0,NULL,NULL,1,NULL,NULL),(4393,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','526','4384','Dividendo activo a pagar',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4395,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','528','4384','Intereses a corto plazo de deudas',0,NULL,NULL,1,NULL,NULL),(4396,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','529','4384','Provisiones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4397,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5291','4396','Provisión a corto plazo para impuestos',0,NULL,NULL,1,NULL,NULL),(4398,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5292','4396','Provisión a corto plazo para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4400,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5295','4396','Provisión a corto plazo para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4401,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','53','4005','Inversiones financieras a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4402,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','530','4401','Participaciones a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4403,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5303','4402','Participaciones a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4404,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5304','4402','Participaciones a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4405,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5305','4402','Participaciones a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4410,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','532','4401','Créditos a corto plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4412,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5324','4410','Créditos a corto plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4423,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5353','4422','Dividendo a cobrar de empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4424,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5354','4422','Dividendo a cobrar de empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4425,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5355','4422','Dividendo a cobrar de otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4430,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','54','4005','Otras inversiones financieras a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4432,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','541','4430','Valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4433,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','542','4430','Créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4435,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','544','4430','Créditos a corto plazo al personal',0,NULL,NULL,1,NULL,NULL),(4436,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','545','4430','Dividendo a cobrar',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4438,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','547','4430','Intereses a corto plazo de créditos',0,NULL,NULL,1,NULL,NULL),(4439,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','548','4430','Imposiciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4441,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','55','4005','Otras cuentas no bancarias',0,NULL,NULL,1,NULL,NULL),(4442,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','550','4441','Titular de la explotación',0,NULL,NULL,1,NULL,NULL),(4443,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','551','4441','Cuenta corriente con socios y administradores',0,NULL,NULL,1,NULL,NULL),(4444,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','552','4441','Cuenta corriente otras personas y entidades vinculadas',0,NULL,NULL,1,NULL,NULL),(4445,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5523','4444','Cuenta corriente con empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4446,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5524','4444','Cuenta corriente con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4447,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5525','4444','Cuenta corriente con otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4449,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','555','4441','Partidas pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4450,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','556','4441','Desembolsos exigidos sobre participaciones en el patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4451,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5563','4450','Desembolsos exigidos sobre participaciones empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4452,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5564','4450','Desembolsos exigidos sobre participaciones empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4453,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5565','4450','Desembolsos exigidos sobre participaciones otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4454,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5566','4450','Desembolsos exigidos sobre participaciones otras empresas',0,NULL,NULL,1,NULL,NULL),(4455,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','557','4441','Dividendo activo a cuenta',0,NULL,NULL,1,NULL,NULL),(4456,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','558','4441','Socios por desembolsos exigidos',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4459,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','559','4441','Derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4460,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5590','4459','Activos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4461,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5595','4459','Pasivos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4463,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','560','4462','Finanzas recibidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4464,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','561','4462','Depósitos recibidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4465,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','565','4462','Finanzas constituidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4466,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','566','4462','Depósitos constituidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4467,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','567','4462','Intereses pagados por anticipado',0,NULL,NULL,1,NULL,NULL),(4468,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','568','4462','Intereses cobrados a corto plazo',0,NULL,NULL,1,NULL,NULL),(4469,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','57','4005','Tesorería',0,NULL,NULL,1,NULL,NULL),(4470,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','CAJA','570','4469','Caja euros',0,NULL,NULL,1,NULL,NULL),(4471,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','571','4469','Caja moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4476,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','576','4469','Inversiones a corto plazo de gran liquidez',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4490,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','596','4477','Deterioro del valor de participaciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4493,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','60','4006','Compras',0,NULL,NULL,1,NULL,NULL),(4494,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','600','4493','Compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4495,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','601','4493','Compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4496,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','602','4493','Compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4497,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','606','4493','Descuentos sobre compras por pronto pago',0,NULL,NULL,1,NULL,NULL),(4498,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6060','4497','Descuentos sobre compras por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4499,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6061','4497','Descuentos sobre compras por pronto pago de materias primas',0,NULL,NULL,1,NULL,NULL),(4500,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6062','4497','Descuentos sobre compras por pronto pago de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4501,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','607','4493','Trabajos realizados por otras empresas',0,NULL,NULL,1,NULL,NULL),(4502,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','608','4493','Devoluciones de compras y operaciones similares',0,NULL,NULL,1,NULL,NULL),(4503,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6080','4502','Devoluciones de compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4504,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6081','4502','Devoluciones de compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4505,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6082','4502','Devoluciones de compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4506,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','609','4493','Rappels por compras',0,NULL,NULL,1,NULL,NULL),(4507,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6090','4506','Rappels por compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4508,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6091','4506','Rappels por compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4509,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6092','4506','Rappels por compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4510,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','61','4006','Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4511,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','610','4510','Variación de existencias de mercaderías',0,NULL,NULL,1,NULL,NULL),(4512,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','611','4510','Variación de existencias de materias primas',0,NULL,NULL,1,NULL,NULL),(4513,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','612','4510','Variación de existencias de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4514,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','62','4006','Servicios exteriores',0,NULL,NULL,1,NULL,NULL),(4515,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','620','4514','Gastos en investigación y desarrollo del ejercicio',0,NULL,NULL,1,NULL,NULL),(4516,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','621','4514','Arrendamientos y cánones',0,NULL,NULL,1,NULL,NULL),(4517,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','622','4514','Reparaciones y conservación',0,NULL,NULL,1,NULL,NULL),(4518,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','623','4514','Servicios profesionales independientes',0,NULL,NULL,1,NULL,NULL),(4519,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','624','4514','Transportes',0,NULL,NULL,1,NULL,NULL),(4520,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','625','4514','Primas de seguros',0,NULL,NULL,1,NULL,NULL),(4521,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','626','4514','Servicios bancarios y similares',0,NULL,NULL,1,NULL,NULL),(4522,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','627','4514','Publicidad, propaganda y relaciones públicas',0,NULL,NULL,1,NULL,NULL),(4523,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','628','4514','Suministros',0,NULL,NULL,1,NULL,NULL),(4524,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','629','4514','Otros servicios',0,NULL,NULL,1,NULL,NULL),(4525,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','63','4006','Tributos',0,NULL,NULL,1,NULL,NULL),(4526,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','630','4525','Impuesto sobre benecifios',0,NULL,NULL,1,NULL,NULL),(4527,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6300','4526','Impuesto corriente',0,NULL,NULL,1,NULL,NULL),(4528,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6301','4526','Impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4529,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','631','4525','Otros tributos',0,NULL,NULL,1,NULL,NULL),(4530,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','633','4525','Ajustes negativos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4531,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','634','4525','Ajustes negativos en la imposición indirecta',0,NULL,NULL,1,NULL,NULL),(4532,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6341','4531','Ajustes negativos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4533,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6342','4531','Ajustes negativos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4534,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','636','4525','Devolución de impuestos',0,NULL,NULL,1,NULL,NULL),(4535,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','638','4525','Ajustes positivos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4536,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','639','4525','Ajustes positivos en la imposición directa',0,NULL,NULL,1,NULL,NULL),(4537,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6391','4536','Ajustes positivos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4538,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6392','4536','Ajustes positivos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4539,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','64','4006','Gastos de personal',0,NULL,NULL,1,NULL,NULL),(4540,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','640','4539','Sueldos y salarios',0,NULL,NULL,1,NULL,NULL),(4541,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','641','4539','Indemnizaciones',0,NULL,NULL,1,NULL,NULL),(4542,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','642','4539','Seguridad social a cargo de la empresa',0,NULL,NULL,1,NULL,NULL),(4543,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','649','4539','Otros gastos sociales',0,NULL,NULL,1,NULL,NULL),(4544,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','65','4006','Otros gastos de gestión',0,NULL,NULL,1,NULL,NULL),(4545,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','650','4544','Pérdidas de créditos comerciales incobrables',0,NULL,NULL,1,NULL,NULL),(4546,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','651','4544','Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4547,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6510','4546','Beneficio transferido gestor',0,NULL,NULL,1,NULL,NULL),(4548,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6511','4546','Pérdida soportada participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4549,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','659','4544','Otras pérdidas en gestión corriente',0,NULL,NULL,1,NULL,NULL),(4550,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','66','4006','Gastos financieros',0,NULL,NULL,1,NULL,NULL),(4551,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','660','4550','Gastos financieros por actualización de provisiones',0,NULL,NULL,1,NULL,NULL),(4552,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','661','4550','Intereses de obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4553,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6610','4452','Intereses de obligaciones y bonos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4554,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6611','4452','Intereses de obligaciones y bonos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4555,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6612','4452','Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4556,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6613','4452','Intereses de obligaciones y bonos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4557,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6615','4452','Intereses de obligaciones y bonos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4558,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6616','4452','Intereses de obligaciones y bonos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4559,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6617','4452','Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4560,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6618','4452','Intereses de obligaciones y bonos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4561,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','662','4550','Intereses de deudas',0,NULL,NULL,1,NULL,NULL),(4562,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6620','4561','Intereses de deudas empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4563,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6621','4561','Intereses de deudas empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4564,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6622','4561','Intereses de deudas otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4565,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6623','4561','Intereses de deudas con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4566,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6624','4561','Intereses de deudas otras empresas',0,NULL,NULL,1,NULL,NULL),(4567,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','663','4550','Pérdidas por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4568,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','664','4550','Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4569,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6640','4568','Dividendos de pasivos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4570,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6641','4568','Dividendos de pasivos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4571,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6642','4568','Dividendos de pasivos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4572,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6643','4568','Dividendos de pasivos otras empresas',0,NULL,NULL,1,NULL,NULL),(4573,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','665','4550','Intereses por descuento de efectos y operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4574,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6650','4573','Intereses por descuento de efectos en entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4575,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6651','4573','Intereses por descuento de efectos en entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4576,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6652','4573','Intereses por descuento de efectos en entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4577,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6653','4573','Intereses por descuento de efectos en otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4578,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6654','4573','Intereses por operaciones de factoring con entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4579,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6655','4573','Intereses por operaciones de factoring con entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4580,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6656','4573','Intereses por operaciones de factoring con otras entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4581,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6657','4573','Intereses por operaciones de factoring con otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4582,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','666','4550','Pérdidas en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4583,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6660','4582','Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4584,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6661','4582','Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4585,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6662','4582','Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4586,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6663','4582','Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4587,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6665','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4588,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6666','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4589,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6667','4582','Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4590,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6668','4582','Pérdidas en valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4591,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','667','4550','Pérdidas de créditos no comerciales',0,NULL,NULL,1,NULL,NULL),(4592,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6670','4591','Pérdidas de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4593,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6671','4591','Pérdidas de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4594,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6672','4591','Pérdidas de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4595,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6673','4591','Pérdidas de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4596,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6675','4591','Pérdidas de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4597,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6676','4591','Pérdidas de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4598,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6677','4591','Pérdidas de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4599,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6678','4591','Pérdidas de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4600,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','668','4550','Diferencias negativas de cambio',0,NULL,NULL,1,NULL,NULL),(4601,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','669','4550','Otros gastos financieros',0,NULL,NULL,1,NULL,NULL),(4602,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','67','4006','Pérdidas procedentes de activos no corrientes y gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4603,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','670','4602','Pérdidas procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4604,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','671','4602','Pérdidas procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4605,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','672','4602','Pérdidas procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4607,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','673','4602','Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4608,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6733','4607','Pérdidas procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4609,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6734','4607','Pérdidas procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4610,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6735','4607','Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4611,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','675','4602','Pérdidas por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4612,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','678','4602','Gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4613,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','68','4006','Dotaciones para amortizaciones',0,NULL,NULL,1,NULL,NULL),(4614,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','680','4613','Amortización del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4615,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','681','4613','Amortización del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4616,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','682','4613','Amortización de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4617,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','69','4006','Pérdidas por deterioro y otras dotaciones',0,NULL,NULL,1,NULL,NULL),(4618,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','690','4617','Pérdidas por deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4619,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','691','4617','Pérdidas por deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4620,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','692','4617','Pérdidas por deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4621,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','693','4617','Pérdidas por deterioro de existencias',0,NULL,NULL,1,NULL,NULL),(4622,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6930','4621','Pérdidas por deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4623,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6931','4621','Pérdidas por deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4624,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6932','4621','Pérdidas por deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4625,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6933','4621','Pérdidas por deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4626,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','694','4617','Pérdidas por deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4627,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','695','4617','Dotación a la provisión por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4628,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6954','4627','Dotación a la provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4629,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6959','4628','Dotación a la provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4630,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','696','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4631,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6960','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4632,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6961','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4633,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6962','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4634,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6963','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4635,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6965','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4636,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6966','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4637,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6967','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4638,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6968','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4639,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','697','4617','Pérdidas por deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4640,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6970','4639','Pérdidas por deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4641,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6971','4639','Pérdidas por deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4642,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6972','4639','Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4643,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6973','4639','Pérdidas por deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4644,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','698','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4645,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6980','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4646,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6981','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4647,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6985','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4648,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6986','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4649,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6988','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',0,NULL,NULL,1,NULL,NULL),(4650,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','699','4617','Pérdidas por deterioro de crédito a corto plazo',0,NULL,NULL,1,NULL,NULL),(4651,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6990','4650','Pérdidas por deterioro de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4652,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6991','4650','Pérdidas por deterioro de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4653,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6992','4650','Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4654,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6993','4650','Pérdidas por deterioro de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4655,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','70','4007','Ventas',0,NULL,NULL,1,NULL,NULL),(4656,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','700','4655','Ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4657,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','701','4655','Ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4658,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','702','4655','Ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4659,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','703','4655','Ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4660,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','704','4655','Ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4661,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','705','4655','Prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4662,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','706','4655','Descuentos sobre ventas por pronto pago',0,NULL,NULL,1,NULL,NULL),(4663,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7060','4662','Descuentos sobre ventas por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4664,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7061','4662','Descuentos sobre ventas por pronto pago de productos terminados',0,NULL,NULL,1,NULL,NULL),(4665,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7062','4662','Descuentos sobre ventas por pronto pago de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4666,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7063','4662','Descuentos sobre ventas por pronto pago de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4667,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','708','4655','Devoluciones de ventas y operacioes similares',0,NULL,NULL,1,NULL,NULL),(4668,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7080','4667','Devoluciones de ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4669,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7081','4667','Devoluciones de ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4670,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7082','4667','Devoluciones de ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4671,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7083','4667','Devoluciones de ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4672,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7084','4667','Devoluciones de ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4673,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','71','4007','Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4674,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','710','4673','Variación de existencias de productos en curso',0,NULL,NULL,1,NULL,NULL),(4675,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','711','4673','Variación de existencias de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4676,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','712','4673','Variación de existencias de productos terminados',0,NULL,NULL,1,NULL,NULL),(4677,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','713','4673','Variación de existencias de subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4678,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','73','4007','Trabajos realizados para la empresa',0,NULL,NULL,1,NULL,NULL),(4679,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','730','4678','Trabajos realizados para el inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4680,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','731','4678','Trabajos realizados para el inmovilizado tangible',0,NULL,NULL,1,NULL,NULL),(4681,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','732','4678','Trabajos realizados en inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4682,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','733','4678','Trabajos realizados para el inmovilizado material en curso',0,NULL,NULL,1,NULL,NULL),(4683,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','74','4007','Subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4684,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','740','4683','Subvenciones, donaciones y legados a la explotación',0,NULL,NULL,1,NULL,NULL),(4685,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','746','4683','Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4686,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','747','4683','Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4687,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','75','4007','Otros ingresos de gestión',0,NULL,NULL,1,NULL,NULL),(4688,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','751','4687','Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4689,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7510','4688','Pérdida transferida gestor',0,NULL,NULL,1,NULL,NULL),(4690,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7511','4688','Beneficio atribuido participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4691,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','752','4687','Ingreso por arrendamiento',0,NULL,NULL,1,NULL,NULL),(4692,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','753','4687','Ingresos de propiedad industrial cedida en explotación',0,NULL,NULL,1,NULL,NULL),(4693,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','754','4687','Ingresos por comisiones',0,NULL,NULL,1,NULL,NULL),(4694,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','755','4687','Ingresos por servicios al personal',0,NULL,NULL,1,NULL,NULL),(4695,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','759','4687','Ingresos por servicios diversos',0,NULL,NULL,1,NULL,NULL),(4696,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76','4007','Ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4697,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','760','4696','Ingresos de participaciones en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4698,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7600','4697','Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4699,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7601','4697','Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4700,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7602','4697','Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4701,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7603','4697','Ingresos de participaciones en instrumentos de patrimonio otras empresas',0,NULL,NULL,1,NULL,NULL),(4702,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','761','4696','Ingresos de valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4703,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7610','4702','Ingresos de valores representativos de deuda empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4704,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7611','4702','Ingresos de valores representativos de deuda empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4705,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7612','4702','Ingresos de valores representativos de deuda otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4706,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7613','4702','Ingresos de valores representativos de deuda otras empresas',0,NULL,NULL,1,NULL,NULL),(4707,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','762','4696','Ingresos de créditos',0,NULL,NULL,1,NULL,NULL),(4708,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7620','4707','Ingresos de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4709,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76200','4708','Ingresos de crédito a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4710,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76201','4708','Ingresos de crédito a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4711,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76202','4708','Ingresos de crédito a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4712,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76203','4708','Ingresos de crédito a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4713,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7621','4707','Ingresos de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4714,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76210','4713','Ingresos de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4715,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76211','4713','Ingresos de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4716,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76212','4713','Ingresos de crédito a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4717,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76213','4713','Ingresos de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4718,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','763','4696','Beneficios por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4719,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','766','4696','Beneficios en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4720,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7660','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4721,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7661','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4722,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7662','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4723,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7663','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4724,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7665','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4725,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7666','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4726,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7667','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4727,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7668','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4728,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','768','4696','Diferencias positivas de cambio',0,NULL,NULL,1,NULL,NULL),(4729,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','769','4696','Otros ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4730,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','77','4007','Beneficios procedentes de activos no corrientes e ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4731,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','770','4730','Beneficios procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4732,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','771','4730','Beneficios procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4733,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','772','4730','Beneficios procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4734,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','773','4730','Beneficios procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4735,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7733','4734','Beneficios procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4736,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7734','4734','Beneficios procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4737,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7735','4734','Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4738,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','775','4730','Beneficios por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4739,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','778','4730','Ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4741,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79','4007','Excesos y aplicaciones de provisiones y pérdidas por deterioro',0,NULL,NULL,1,NULL,NULL),(4742,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','790','4741','Revisión del deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4743,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','791','4741','Revisión del deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4744,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','792','4741','Revisión del deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4745,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','793','4741','Revisión del deterioro de las existencias',0,NULL,NULL,1,NULL,NULL),(4746,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7930','4745','Revisión del deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4747,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7931','4745','Revisión del deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4748,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7932','4745','Revisión del deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4749,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7933','4745','Revisión del deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4750,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','794','4741','Revisión del deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4751,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','795','4741','Exceso de provisiones',0,NULL,NULL,1,NULL,NULL),(4752,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7951','4751','Exceso de provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4753,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7952','4751','Exceso de provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(4755,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7954','4751','Exceso de provisión para operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4756,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79544','4755','Exceso de provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4757,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79549','4755','Exceso de provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4758,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7955','4751','Exceso de provisión para actuaciones medioambienteales',0,NULL,NULL,1,NULL,NULL),(4759,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','796','4741','Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4760,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7960','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4761,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7961','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4762,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7962','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4763,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7963','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4764,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7965','4759','Revisión del deterioro de valores representativos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4765,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7966','4759','Revisión del deterioro de valores representativos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4766,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7967','4759','Revisión del deterioro de valores representativos a largo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4767,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7968','4759','Revisión del deterioro de valores representativos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4768,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','797','4741','Revisión del deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4769,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7970','4768','Revisión del deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4770,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7971','4768','Revisión del deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4771,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7972','4768','Revisión del deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4772,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7973','4768','Revisión del deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4773,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','798','4741','Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4774,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7980','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4775,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7981','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4776,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7985','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4777,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7986','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4778,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7987','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4779,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7988','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4780,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','799','4741','Revisión del deterioro de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4781,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7990','4780','Revisión del deterioro de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4782,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7991','4780','Revisión del deterioro de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4783,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7992','4780','Revisión del deterioro de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4784,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7993','4780','Revisión del deterioro de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL); +INSERT INTO `llx_accounting_account` VALUES (1,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','CAPITAL','101','1401','Capital',0,NULL,NULL,1,NULL,NULL),(2,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','105','1401','Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(3,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1061','1401','Réserve légale',0,NULL,NULL,1,NULL,NULL),(4,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1063','1401','Réserves statutaires ou contractuelles',0,NULL,NULL,1,NULL,NULL),(5,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1064','1401','Réserves réglementées',0,NULL,NULL,1,NULL,NULL),(6,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1068','1401','Autres réserves',0,NULL,NULL,1,NULL,NULL),(7,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','108','1401','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(8,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','12','1401','Résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(9,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','145','1401','Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(10,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','146','1401','Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(11,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','147','1401','Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(12,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','148','1401','Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(13,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','15','1401','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(14,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','16','1401','Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(15,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','20','1402','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(16,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','201','15','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(17,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','206','15','Droit au bail',0,NULL,NULL,1,NULL,NULL),(18,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','207','15','Fonds commercial',0,NULL,NULL,1,NULL,NULL),(19,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','208','15','Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(20,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','21','1402','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(21,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','23','1402','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(22,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','27','1402','Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(23,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','280','1402','Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(24,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','281','1402','Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(25,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','290','1402','Provisions pour dépréciation des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(26,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','291','1402','Provisions pour dépréciation des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(28,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','31','1403','Matieres premières',0,NULL,NULL,1,NULL,NULL),(29,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','32','1403','Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(30,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','33','1403','En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(31,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','34','1403','En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(32,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','35','1403','Stocks de produits',0,NULL,NULL,1,NULL,NULL),(33,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','37','1403','Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(35,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','392','1403','Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(38,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','395','1403','Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(39,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','397','1403','Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(40,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','SUPPLIER','400','1404','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(41,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','409','1404','Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(42,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','CUSTOMER','410','1404','Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(43,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','419','1404','Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(44,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','421','1404','Personnel',0,NULL,NULL,1,NULL,NULL),(45,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','428','1404','Personnel',0,NULL,NULL,1,NULL,NULL),(46,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','43','1404','Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(47,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','444','1404','Etat - impôts sur bénéfice',0,NULL,NULL,1,NULL,NULL),(48,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','445','1404','Etat - Taxes sur chiffre affaires',0,NULL,NULL,1,NULL,NULL),(49,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','447','1404','Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(50,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','45','1404','Groupe et associes',0,NULL,NULL,1,NULL,NULL),(51,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','455','50','Associés',0,NULL,NULL,1,NULL,NULL),(52,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','46','1404','Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(53,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','47','1404','Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(54,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','481','1404','Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(55,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','486','1404','Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(56,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','487','1404','Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(57,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','491','1404','Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(59,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','50','1405','Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(60,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','BANK','51','1405','Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(61,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','CASH','53','1405','Caisse',0,NULL,NULL,1,NULL,NULL),(62,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','54','1405','Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(63,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','58','1405','Virements internes',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(65,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','PRODUCT','60','1406','Achats',0,NULL,NULL,1,NULL,NULL),(66,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','603','65','Variations des stocks',0,NULL,NULL,1,NULL,NULL),(67,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SERVICE','61','1406','Services extérieurs',0,NULL,NULL,1,NULL,NULL),(68,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','62','1406','Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(69,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','63','1406','Impôts, taxes et versements assimiles',0,NULL,NULL,1,NULL,NULL),(70,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','641','1406','Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(71,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','644','1406','Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(72,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SOCIAL','645','1406','Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(73,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','646','1406','Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(74,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','65','1406','Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(75,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','66','1406','Charges financières',0,NULL,NULL,1,NULL,NULL),(76,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','67','1406','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(77,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','681','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(78,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','686','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(79,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','687','1406','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(80,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','691','1406','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(81,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','695','1406','Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(82,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','697','1406','Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(83,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','699','1406','Produits',0,NULL,NULL,1,NULL,NULL),(84,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','701','1407','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(85,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','SERVICE','706','1407','Prestations de services',0,NULL,NULL,1,NULL,NULL),(86,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','707','1407','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(87,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','708','1407','Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(88,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','709','1407','Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(89,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','713','1407','Variation des stocks',0,NULL,NULL,1,NULL,NULL),(90,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','72','1407','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(91,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','73','1407','Produits nets partiels sur opérations à long terme',0,NULL,NULL,1,NULL,NULL),(92,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','74','1407','Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(93,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','75','1407','Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(94,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','753','93','Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(95,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','754','93','Ristournes perçues des coopératives',0,NULL,NULL,1,NULL,NULL),(96,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','755','93','Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(97,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','76','1407','Produits financiers',0,NULL,NULL,1,NULL,NULL),(98,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','77','1407','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(99,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','781','1407','Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(100,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','786','1407','Reprises sur provisions pour risques',0,NULL,NULL,1,NULL,NULL),(101,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','787','1407','Reprises sur provisions',0,NULL,NULL,1,NULL,NULL),(102,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','79','1407','Transferts de charges',0,NULL,NULL,1,NULL,NULL),(103,1,NULL,'2017-02-20 10:49:11','PCG99-BASE','CAPIT','XXXXXX','10','1501','Capital et réserves',0,NULL,NULL,1,NULL,NULL),(104,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','CAPITAL','101','103','Capital',0,NULL,NULL,1,NULL,NULL),(105,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','104','103','Primes liées au capital social',0,NULL,NULL,1,NULL,NULL),(106,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','105','103','Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(107,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','106','103','Réserves',0,NULL,NULL,1,NULL,NULL),(108,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','107','103','Ecart d\'equivalence',0,NULL,NULL,1,NULL,NULL),(109,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','108','103','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(110,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','109','103','Actionnaires : capital souscrit - non appelé',0,NULL,NULL,1,NULL,NULL),(111,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','11','1501','Report à nouveau (solde créditeur ou débiteur)',0,NULL,NULL,1,NULL,NULL),(112,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','110','111','Report à nouveau (solde créditeur)',0,NULL,NULL,1,NULL,NULL),(113,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','119','111','Report à nouveau (solde débiteur)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(115,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','120','114','Résultat de l\'exercice (bénéfice)',0,NULL,NULL,1,NULL,NULL),(116,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','129','114','Résultat de l\'exercice (perte)',0,NULL,NULL,1,NULL,NULL),(117,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','13','1501','Subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(118,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','131','117','Subventions d\'équipement',0,NULL,NULL,1,NULL,NULL),(119,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','138','117','Autres subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(120,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','139','117','Subventions d\'investissement inscrites au compte de résultat',0,NULL,NULL,1,NULL,NULL),(121,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','14','1501','Provisions réglementées',0,NULL,NULL,1,NULL,NULL),(122,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','142','121','Provisions réglementées relatives aux immobilisations',0,NULL,NULL,1,NULL,NULL),(123,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','143','121','Provisions réglementées relatives aux stocks',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(125,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','145','121','Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(126,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','146','121','Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(127,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','147','121','Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(128,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','148','121','Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(129,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','15','1501','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(130,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','151','129','Provisions pour risques',0,NULL,NULL,1,NULL,NULL),(131,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','153','129','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(132,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','154','129','Provisions pour restructurations',0,NULL,NULL,1,NULL,NULL),(133,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','155','129','Provisions pour impôts',0,NULL,NULL,1,NULL,NULL),(134,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','156','129','Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',0,NULL,NULL,1,NULL,NULL),(135,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','157','129','Provisions pour charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(136,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','158','129','Autres provisions pour charges',0,NULL,NULL,1,NULL,NULL),(137,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','16','1501','Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(138,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','161','137','Emprunts obligataires convertibles',0,NULL,NULL,1,NULL,NULL),(139,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','163','137','Autres emprunts obligataires',0,NULL,NULL,1,NULL,NULL),(140,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','164','137','Emprunts auprès des établissements de crédit',0,NULL,NULL,1,NULL,NULL),(141,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','165','137','Dépôts et cautionnements reçus',0,NULL,NULL,1,NULL,NULL),(142,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','166','137','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(143,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','167','137','Emprunts et dettes assortis de conditions particulières',0,NULL,NULL,1,NULL,NULL),(144,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','168','137','Autres emprunts et dettes assimilées',0,NULL,NULL,1,NULL,NULL),(145,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','169','137','Primes de remboursement des obligations',0,NULL,NULL,1,NULL,NULL),(146,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','17','1501','Dettes rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(147,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','171','146','Dettes rattachées à des participations (groupe)',0,NULL,NULL,1,NULL,NULL),(148,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','174','146','Dettes rattachées à des participations (hors groupe)',0,NULL,NULL,1,NULL,NULL),(149,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','178','146','Dettes rattachées à des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(151,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','181','150','Comptes de liaison des établissements',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(154,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','188','150','Comptes de liaison des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(155,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','20','1502','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(156,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','201','155','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(157,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','203','155','Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(159,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','206','155','Droit au bail',0,NULL,NULL,1,NULL,NULL),(160,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','207','155','Fonds commercial',0,NULL,NULL,1,NULL,NULL),(161,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','208','155','Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(162,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','21','1502','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(163,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','211','162','Terrains',0,NULL,NULL,1,NULL,NULL),(164,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','212','162','Agencements et aménagements de terrains',0,NULL,NULL,1,NULL,NULL),(165,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','213','162','Constructions',0,NULL,NULL,1,NULL,NULL),(166,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','214','162','Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(167,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','215','162','Installations techniques, matériels et outillage industriels',0,NULL,NULL,1,NULL,NULL),(168,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','218','162','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(169,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','22','1502','Immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(170,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','23','1502','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(171,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','231','170','Immobilisations corporelles en cours',0,NULL,NULL,1,NULL,NULL),(172,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','232','170','Immobilisations incorporelles en cours',0,NULL,NULL,1,NULL,NULL),(173,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','237','170','Avances et acomptes versés sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(176,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','26','1502','Participations et créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(177,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','261','176','Titres de participation',0,NULL,NULL,1,NULL,NULL),(178,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','266','176','Autres formes de participation',0,NULL,NULL,1,NULL,NULL),(179,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','267','176','Créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(182,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','27','1502','Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(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é)',0,NULL,NULL,1,NULL,NULL),(184,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','272','183','Titres immobilisés (droit de créance)',0,NULL,NULL,1,NULL,NULL),(185,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','273','183','Titres immobilisés de l\'activité de portefeuille',0,NULL,NULL,1,NULL,NULL),(186,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','274','183','Prêts',0,NULL,NULL,1,NULL,NULL),(187,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','275','183','Dépôts et cautionnements versés',0,NULL,NULL,1,NULL,NULL),(188,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','276','183','Autres créances immobilisées',0,NULL,NULL,1,NULL,NULL),(189,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','277','183','(Actions propres ou parts propres)',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(191,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','28','1502','Amortissements des immobilisations',0,NULL,NULL,1,NULL,NULL),(192,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','280','191','Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(193,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','281','191','Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(194,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','282','191','Amortissements des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(195,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','29','1502','Dépréciations des immobilisations',0,NULL,NULL,1,NULL,NULL),(196,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','290','195','Dépréciations des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(197,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','291','195','Dépréciations des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(198,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','292','195','Dépréciations des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(199,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','293','195','Dépréciations des immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(202,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','31','1503','Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(203,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','311','202','Matières (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(204,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','312','202','Matières (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(205,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','317','202','Fournitures A, B, C,',0,NULL,NULL,1,NULL,NULL),(206,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','32','1503','Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(207,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','321','206','Matières consommables',0,NULL,NULL,1,NULL,NULL),(208,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','322','206','Fournitures consommables',0,NULL,NULL,1,NULL,NULL),(209,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','326','206','Emballages',0,NULL,NULL,1,NULL,NULL),(210,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','33','1503','En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(211,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','331','210','Produits en cours',0,NULL,NULL,1,NULL,NULL),(212,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','335','210','Travaux en cours',0,NULL,NULL,1,NULL,NULL),(213,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','34','1503','En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(214,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','341','213','Etudes en cours',0,NULL,NULL,1,NULL,NULL),(215,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','345','213','Prestations de services en cours',0,NULL,NULL,1,NULL,NULL),(216,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','35','1503','Stocks de produits',0,NULL,NULL,1,NULL,NULL),(217,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','351','216','Produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(218,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','355','216','Produits finis',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(220,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','37','1503','Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(221,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','371','220','Marchandises (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(222,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','372','220','Marchandises (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(225,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','392','223','Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(228,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','395','223','Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(229,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','397','223','Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(230,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','40','1504','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(231,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','400','230','Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(232,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','SUPPLIER','401','230','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(233,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','403','230','Fournisseurs - Effets à payer',0,NULL,NULL,1,NULL,NULL),(234,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','404','230','Fournisseurs d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(235,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','405','230','Fournisseurs d\'immobilisations - Effets à payer',0,NULL,NULL,1,NULL,NULL),(236,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','408','230','Fournisseurs - Factures non parvenues',0,NULL,NULL,1,NULL,NULL),(237,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','409','230','Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(238,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','41','1504','Clients et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(239,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','410','238','Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(240,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','CUSTOMER','411','238','Clients',0,NULL,NULL,1,NULL,NULL),(241,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','413','238','Clients - Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(242,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','416','238','Clients douteux ou litigieux',0,NULL,NULL,1,NULL,NULL),(243,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','418','238','Clients - Produits non encore facturés',0,NULL,NULL,1,NULL,NULL),(244,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','419','238','Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(245,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','42','1504','Personnel et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(246,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','421','245','Personnel - Rémunérations dues',0,NULL,NULL,1,NULL,NULL),(247,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','422','245','Comités d\'entreprises, d\'établissement, ...',0,NULL,NULL,1,NULL,NULL),(248,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','424','245','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(249,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','425','245','Personnel - Avances et acomptes',0,NULL,NULL,1,NULL,NULL),(250,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','426','245','Personnel - Dépôts',0,NULL,NULL,1,NULL,NULL),(251,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','427','245','Personnel - Oppositions',0,NULL,NULL,1,NULL,NULL),(252,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','428','245','Personnel - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(253,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','43','1504','Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(254,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','431','253','Sécurité sociale',0,NULL,NULL,1,NULL,NULL),(255,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','437','253','Autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(256,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','438','253','Organismes sociaux - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(257,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','44','1504','État et autres collectivités publiques',0,NULL,NULL,1,NULL,NULL),(258,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','441','257','État - Subventions à recevoir',0,NULL,NULL,1,NULL,NULL),(259,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','442','257','Etat - Impôts et taxes recouvrables sur des tiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(261,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','444','257','Etat - Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(262,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','445','257','Etat - Taxes sur le chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(263,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','446','257','Obligations cautionnées',0,NULL,NULL,1,NULL,NULL),(264,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','447','257','Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(265,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','448','257','Etat - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(266,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','449','257','Quotas d\'émission à restituer à l\'Etat',0,NULL,NULL,1,NULL,NULL),(267,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','45','1504','Groupe et associes',0,NULL,NULL,1,NULL,NULL),(268,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','451','267','Groupe',0,NULL,NULL,1,NULL,NULL),(269,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','455','267','Associés - Comptes courants',0,NULL,NULL,1,NULL,NULL),(270,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','456','267','Associés - Opérations sur le capital',0,NULL,NULL,1,NULL,NULL),(271,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','457','267','Associés - Dividendes à payer',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(273,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','46','1504','Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(274,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','462','273','Créances sur cessions d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(275,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','464','273','Dettes sur acquisitions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(277,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','467','273','Autres comptes débiteurs ou créditeurs',0,NULL,NULL,1,NULL,NULL),(278,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','468','273','Divers - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(279,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','47','1504','Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(280,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','471','279','Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(281,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','476','279','Différence de conversion - Actif',0,NULL,NULL,1,NULL,NULL),(282,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','477','279','Différences de conversion - Passif',0,NULL,NULL,1,NULL,NULL),(283,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','478','279','Autres comptes transitoires',0,NULL,NULL,1,NULL,NULL),(284,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','48','1504','Comptes de régularisation',0,NULL,NULL,1,NULL,NULL),(285,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','481','284','Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(286,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','486','284','Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(287,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','487','284','Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(289,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','489','284','Quotas d\'émission alloués par l\'Etat',0,NULL,NULL,1,NULL,NULL),(290,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','49','1504','Provisions pour dépréciation des comptes de tiers',0,NULL,NULL,1,NULL,NULL),(291,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','491','290','Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(294,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','50','1505','Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(295,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','501','294','Parts dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(296,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','502','294','Actions propres',0,NULL,NULL,1,NULL,NULL),(297,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','503','294','Actions',0,NULL,NULL,1,NULL,NULL),(298,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','504','294','Autres titres conférant un droit de propriété',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(300,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','506','294','Obligations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(304,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','51','1505','Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(305,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','511','304','Valeurs à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(306,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','BANK','512','304','Banques',0,NULL,NULL,1,NULL,NULL),(307,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','514','304','Chèques postaux',0,NULL,NULL,1,NULL,NULL),(308,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','515','304','\"Caisses\" du Trésor et des établissements publics',0,NULL,NULL,1,NULL,NULL),(309,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','516','304','Sociétés de bourse',0,NULL,NULL,1,NULL,NULL),(310,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','517','304','Autres organismes financiers',0,NULL,NULL,1,NULL,NULL),(311,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','518','304','Intérêts courus',0,NULL,NULL,1,NULL,NULL),(312,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','519','304','Concours bancaires courants',0,NULL,NULL,1,NULL,NULL),(313,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','52','1505','Instruments de trésorerie',0,NULL,NULL,1,NULL,NULL),(314,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','CASH','53','1505','Caisse',0,NULL,NULL,1,NULL,NULL),(315,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','531','314','Caisse siège social',0,NULL,NULL,1,NULL,NULL),(316,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','532','314','Caisse succursale (ou usine) A',0,NULL,NULL,1,NULL,NULL),(317,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','533','314','Caisse succursale (ou usine) B',0,NULL,NULL,1,NULL,NULL),(318,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','54','1505','Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(319,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','58','1505','Virements internes',0,NULL,NULL,1,NULL,NULL),(320,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','59','1505','Provisions pour dépréciation des comptes financiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(322,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','PRODUCT','60','1506','Achats',0,NULL,NULL,1,NULL,NULL),(323,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','601','322','Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(324,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','602','322','Achats stockés - Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(325,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','603','322','Variations des stocks (approvisionnements et marchandises)',0,NULL,NULL,1,NULL,NULL),(326,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','604','322','Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(327,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','605','322','Achats de matériel, équipements et travaux',0,NULL,NULL,1,NULL,NULL),(328,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','606','322','Achats non stockés de matière et fournitures',0,NULL,NULL,1,NULL,NULL),(329,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','607','322','Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(330,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','608','322','(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',0,NULL,NULL,1,NULL,NULL),(331,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','609','322','Rabais, remises et ristournes obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(332,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SERVICE','61','1506','Services extérieurs',0,NULL,NULL,1,NULL,NULL),(333,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','611','332','Sous-traitance générale',0,NULL,NULL,1,NULL,NULL),(334,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','612','332','Redevances de crédit-bail',0,NULL,NULL,1,NULL,NULL),(335,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','613','332','Locations',0,NULL,NULL,1,NULL,NULL),(336,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','614','332','Charges locatives et de copropriété',0,NULL,NULL,1,NULL,NULL),(337,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','615','332','Entretien et réparations',0,NULL,NULL,1,NULL,NULL),(338,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','616','332','Primes d\'assurances',0,NULL,NULL,1,NULL,NULL),(339,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','617','332','Etudes et recherches',0,NULL,NULL,1,NULL,NULL),(340,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','618','332','Divers',0,NULL,NULL,1,NULL,NULL),(341,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','619','332','Rabais, remises et ristournes obtenus sur services extérieurs',0,NULL,NULL,1,NULL,NULL),(342,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','62','1506','Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(343,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','621','342','Personnel extérieur à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(344,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','622','342','Rémunérations d\'intermédiaires et honoraires',0,NULL,NULL,1,NULL,NULL),(345,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','623','342','Publicité, publications, relations publiques',0,NULL,NULL,1,NULL,NULL),(346,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','624','342','Transports de biens et transports collectifs du personnel',0,NULL,NULL,1,NULL,NULL),(347,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','625','342','Déplacements, missions et réceptions',0,NULL,NULL,1,NULL,NULL),(348,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','626','342','Frais postaux et de télécommunications',0,NULL,NULL,1,NULL,NULL),(349,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','627','342','Services bancaires et assimilés',0,NULL,NULL,1,NULL,NULL),(350,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','628','342','Divers',0,NULL,NULL,1,NULL,NULL),(351,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','629','342','Rabais, remises et ristournes obtenus sur autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(352,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','63','1506','Impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(353,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','631','352','Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(354,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','633','352','Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',0,NULL,NULL,1,NULL,NULL),(355,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','635','352','Autres impôts, taxes et versements assimilés (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(356,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','637','352','Autres impôts, taxes et versements assimilés (autres organismes)',0,NULL,NULL,1,NULL,NULL),(357,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','64','1506','Charges de personnel',0,NULL,NULL,1,NULL,NULL),(358,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','641','357','Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(359,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','644','357','Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(360,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SOCIAL','645','357','Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(361,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','646','357','Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(362,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','647','357','Autres charges sociales',0,NULL,NULL,1,NULL,NULL),(363,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','648','357','Autres charges de personnel',0,NULL,NULL,1,NULL,NULL),(364,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','65','1506','Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(365,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','651','364','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(366,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','653','364','Jetons de présence',0,NULL,NULL,1,NULL,NULL),(367,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','654','364','Pertes sur créances irrécouvrables',0,NULL,NULL,1,NULL,NULL),(368,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','655','364','Quote-part de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(369,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','658','364','Charges diverses de gestion courante',0,NULL,NULL,1,NULL,NULL),(370,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','66','1506','Charges financières',0,NULL,NULL,1,NULL,NULL),(371,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','661','370','Charges d\'intérêts',0,NULL,NULL,1,NULL,NULL),(372,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','664','370','Pertes sur créances liées à des participations',0,NULL,NULL,1,NULL,NULL),(373,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','665','370','Escomptes accordés',0,NULL,NULL,1,NULL,NULL),(374,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','666','370','Pertes de change',0,NULL,NULL,1,NULL,NULL),(375,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','667','370','Charges nettes sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(376,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','668','370','Autres charges financières',0,NULL,NULL,1,NULL,NULL),(377,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','67','1506','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(378,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','671','377','Charges exceptionnelles sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(379,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','672','377','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(380,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','675','377','Valeurs comptables des éléments d\'actif cédés',0,NULL,NULL,1,NULL,NULL),(381,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','678','377','Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(382,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','68','1506','Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(383,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','681','382','Dotations aux amortissements et aux provisions - Charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(384,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','686','382','Dotations aux amortissements et aux provisions - Charges financières',0,NULL,NULL,1,NULL,NULL),(385,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','687','382','Dotations aux amortissements et aux provisions - Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(386,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','69','1506','Participation des salariés - impôts sur les bénéfices et assimiles',0,NULL,NULL,1,NULL,NULL),(387,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','691','386','Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(388,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','695','386','Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(389,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','696','386','Suppléments d\'impôt sur les sociétés liés aux distributions',0,NULL,NULL,1,NULL,NULL),(390,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','697','386','Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(391,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','698','386','Intégration fiscale',0,NULL,NULL,1,NULL,NULL),(392,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','699','386','Produits - Reports en arrière des déficits',0,NULL,NULL,1,NULL,NULL),(393,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','70','1507','Ventes de produits fabriqués, prestations de services, marchandises',0,NULL,NULL,1,NULL,NULL),(394,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','701','393','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(395,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','702','393','Ventes de produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(396,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','703','393','Ventes de produits résiduels',0,NULL,NULL,1,NULL,NULL),(397,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','704','393','Travaux',0,NULL,NULL,1,NULL,NULL),(398,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','705','393','Etudes',0,NULL,NULL,1,NULL,NULL),(399,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','SERVICE','706','393','Prestations de services',0,NULL,NULL,1,NULL,NULL),(400,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','707','393','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(401,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','708','393','Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(402,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','709','393','Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(403,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','71','1507','Production stockée (ou déstockage)',0,NULL,NULL,1,NULL,NULL),(404,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','713','403','Variation des stocks (en-cours de production, produits)',0,NULL,NULL,1,NULL,NULL),(405,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','72','1507','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(406,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','721','405','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(407,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','722','405','Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(408,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','74','1507','Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(409,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','75','1507','Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(410,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','751','409','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(411,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','752','409','Revenus des immeubles non affectés à des activités professionnelles',0,NULL,NULL,1,NULL,NULL),(412,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','753','409','Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(413,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','754','409','Ristournes perçues des coopératives (provenant des excédents)',0,NULL,NULL,1,NULL,NULL),(414,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','755','409','Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(415,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','758','409','Produits divers de gestion courante',0,NULL,NULL,1,NULL,NULL),(416,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','76','1507','Produits financiers',0,NULL,NULL,1,NULL,NULL),(417,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','761','416','Produits de participations',0,NULL,NULL,1,NULL,NULL),(418,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','762','416','Produits des autres immobilisations financières',0,NULL,NULL,1,NULL,NULL),(419,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','763','416','Revenus des autres créances',0,NULL,NULL,1,NULL,NULL),(420,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','764','416','Revenus des valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(421,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','765','416','Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(422,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','766','416','Gains de change',0,NULL,NULL,1,NULL,NULL),(423,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','767','416','Produits nets sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(424,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','768','416','Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(425,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','77','1507','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(426,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','771','425','Produits exceptionnels sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(427,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','772','425','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(428,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','775','425','Produits des cessions d\'éléments d\'actif',0,NULL,NULL,1,NULL,NULL),(429,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','777','425','Quote-part des subventions d\'investissement virée au résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(430,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','778','425','Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(431,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','78','1507','Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(432,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','781','431','Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',0,NULL,NULL,1,NULL,NULL),(433,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','786','431','Reprises sur provisions pour risques (à inscrire dans les produits financiers)',0,NULL,NULL,1,NULL,NULL),(434,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','787','431','Reprises sur provisions (à inscrire dans les produits exceptionnels)',0,NULL,NULL,1,NULL,NULL),(435,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','79','1507','Transferts de charges',0,NULL,NULL,1,NULL,NULL),(436,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','791','435','Transferts de charges d\'exploitation ',0,NULL,NULL,1,NULL,NULL),(437,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','796','435','Transferts de charges financières',0,NULL,NULL,1,NULL,NULL),(438,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','797','435','Transferts de charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(439,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','10','1351','Capital',0,NULL,NULL,1,NULL,NULL),(440,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','100','439','Capital souscrit ou capital personnel',0,NULL,NULL,1,NULL,NULL),(441,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1000','440','Capital non amorti',0,NULL,NULL,1,NULL,NULL),(442,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1001','440','Capital amorti',0,NULL,NULL,1,NULL,NULL),(443,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','101','439','Capital non appelé',0,NULL,NULL,1,NULL,NULL),(444,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','109','439','Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(445,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1090','444','Opérations courantes',0,NULL,NULL,1,NULL,NULL),(446,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1091','444','Impôts personnels',0,NULL,NULL,1,NULL,NULL),(447,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1092','444','Rémunérations et autres avantages',0,NULL,NULL,1,NULL,NULL),(448,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','11','1351','Primes d\'émission',0,NULL,NULL,1,NULL,NULL),(449,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','12','1351','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(450,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','120','449','Plus-values de réévaluation sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(451,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1200','450','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(452,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1201','450','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(453,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','121','449','Plus-values de réévaluation sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(454,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1210','453','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(455,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1211','453','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(456,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','122','449','Plus-values de réévaluation sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(457,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1220','456','Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(458,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1221','456','Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(459,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','123','449','Plus-values de réévaluation sur stocks',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(461,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','13','1351','Réserve',0,NULL,NULL,1,NULL,NULL),(462,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','130','461','Réserve légale',0,NULL,NULL,1,NULL,NULL),(463,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','131','461','Réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(464,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1310','463','Réserve pour actions propres',0,NULL,NULL,1,NULL,NULL),(465,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1311','463','Autres réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(466,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','132','461','Réserves immunisées',0,NULL,NULL,1,NULL,NULL),(467,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','133','461','Réserves disponibles',0,NULL,NULL,1,NULL,NULL),(468,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1330','467','Réserve pour régularisation de dividendes',0,NULL,NULL,1,NULL,NULL),(469,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1331','467','Réserve pour renouvellement des immobilisations',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(471,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','14','1351','Bénéfice reporté (ou perte reportée)',0,NULL,NULL,1,NULL,NULL),(472,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','15','1351','Subsides en capital',0,NULL,NULL,1,NULL,NULL),(473,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','150','472','Montants obtenus',0,NULL,NULL,1,NULL,NULL),(474,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','151','472','Montants transférés aux résultats',0,NULL,NULL,1,NULL,NULL),(475,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','16','1351','Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(476,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','160','475','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(477,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','161','475','Provisions pour charges fiscales',0,NULL,NULL,1,NULL,NULL),(478,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','162','475','Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(479,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','163','475','à 169 Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(485,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','169','475','Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(486,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1690','485','Pour litiges en cours',0,NULL,NULL,1,NULL,NULL),(487,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1691','485','Pour amendes, doubles droits et pénalités',0,NULL,NULL,1,NULL,NULL),(488,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1692','485','Pour propre assureur',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(490,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1695','485','Provision pour charge de liquidation',0,NULL,NULL,1,NULL,NULL),(491,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1696','485','Provision pour départ de personnel',0,NULL,NULL,1,NULL,NULL),(492,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1699','485','Pour risques divers',0,NULL,NULL,1,NULL,NULL),(493,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17','1351','Dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(494,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','170','493','Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(495,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1700','494','Convertibles',0,NULL,NULL,1,NULL,NULL),(496,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1701','494','Non convertibles',0,NULL,NULL,1,NULL,NULL),(497,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','171','493','Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(498,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1710','498','Convertibles',0,NULL,NULL,1,NULL,NULL),(499,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1711','498','Non convertibles',0,NULL,NULL,1,NULL,NULL),(500,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','172','493','Dettes de location-financement et assimilés',0,NULL,NULL,1,NULL,NULL),(501,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1720','500','Dettes de location-financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(502,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1721','500','Dettes de location-financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(503,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1722','500','Dettes sur droits réels sur immeubles',0,NULL,NULL,1,NULL,NULL),(504,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','173','493','Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(505,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1730','504','Dettes en compte',0,NULL,NULL,1,NULL,NULL),(506,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17300','505','Banque A',0,NULL,NULL,1,NULL,NULL),(507,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17301','505','Banque B',0,NULL,NULL,1,NULL,NULL),(508,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17302','505','Banque C',0,NULL,NULL,1,NULL,NULL),(509,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17303','505','Banque D',0,NULL,NULL,1,NULL,NULL),(510,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1731','504','Promesses',0,NULL,NULL,1,NULL,NULL),(511,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17310','510','Banque A',0,NULL,NULL,1,NULL,NULL),(512,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17311','510','Banque B',0,NULL,NULL,1,NULL,NULL),(513,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17312','510','Banque C',0,NULL,NULL,1,NULL,NULL),(514,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17313','510','Banque D',0,NULL,NULL,1,NULL,NULL),(515,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1732','504','Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(516,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17320','515','Banque A',0,NULL,NULL,1,NULL,NULL),(517,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17321','515','Banque B',0,NULL,NULL,1,NULL,NULL),(518,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17322','515','Banque C',0,NULL,NULL,1,NULL,NULL),(519,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17323','515','Banque D',0,NULL,NULL,1,NULL,NULL),(520,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','174','493','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(521,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175','493','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(522,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1750','521','Fournisseurs : dettes en compte',0,NULL,NULL,1,NULL,NULL),(523,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17500','522','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(524,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175000','523','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(525,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175001','523','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(526,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17501','522','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(527,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175010','526','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(528,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175011','526','Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(529,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175012','526','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(530,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1751','521','Effets à payer',0,NULL,NULL,1,NULL,NULL),(531,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17510','530','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(532,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175100','531','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(533,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175101','531','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(534,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17511','530','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(535,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175110','534','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(536,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175111','534','Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(537,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175112','534','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(538,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','176','493','Acomptes reçus sur commandes',0,NULL,NULL,1,NULL,NULL),(539,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','178','493','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(540,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','179','493','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(541,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1790','540','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(543,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1792','540','Administrateurs, gérants et associés',0,NULL,NULL,1,NULL,NULL),(544,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1794','540','Rentes viagères capitalisées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(546,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1799','540','Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(547,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','18','1351','Comptes de liaison des établissements et succursales',0,NULL,NULL,1,NULL,NULL),(548,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','20','1352','Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(549,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','200','548','Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(550,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2000','549','Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(552,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','201','548','Frais d\'émission d\'emprunts et primes de remboursement',0,NULL,NULL,1,NULL,NULL),(553,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2010','552','Agios sur emprunts et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(555,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','202','548','Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(556,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2020','555','Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(557,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2029','555','Amortissements sur autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(558,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','203','548','Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(559,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2030','558','Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(560,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2039','558','Amortissements sur intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(561,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','204','548','Frais de restructuration',0,NULL,NULL,1,NULL,NULL),(562,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2040','561','Coût des frais de restructuration',0,NULL,NULL,1,NULL,NULL),(563,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2049','561','Amortissements sur frais de restructuration',0,NULL,NULL,1,NULL,NULL),(564,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','21','1352','Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(565,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','210','564','Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(566,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2100','565','Frais de recherche et de mise au point',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(569,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','211','564','Concessions, brevets, licences, savoir-faire, marque et droits similaires',0,NULL,NULL,1,NULL,NULL),(570,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2110','569','Concessions, brevets, licences, marques, etc',0,NULL,NULL,1,NULL,NULL),(571,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2118','569','Plus-values actées sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(572,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2119','569','Amortissements sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(573,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','212','564','Goodwill',0,NULL,NULL,1,NULL,NULL),(574,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2120','573','Coût d\'acquisition',0,NULL,NULL,1,NULL,NULL),(575,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2128','573','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(576,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2129','573','Amortissements sur goodwill',0,NULL,NULL,1,NULL,NULL),(577,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','213','564','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(578,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22','1352','Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(579,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','220','578','Terrains',0,NULL,NULL,1,NULL,NULL),(580,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2200','579','Terrains',0,NULL,NULL,1,NULL,NULL),(581,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2201','579','Frais d\'acquisition sur terrains',0,NULL,NULL,1,NULL,NULL),(582,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2208','579','Plus-values actées sur terrains',0,NULL,NULL,1,NULL,NULL),(583,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2209','579','Amortissements et réductions de valeur',0,NULL,NULL,1,NULL,NULL),(584,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22090','583','Amortissements sur frais d\'acquisition',0,NULL,NULL,1,NULL,NULL),(585,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22091','583','Réductions de valeur sur terrains',0,NULL,NULL,1,NULL,NULL),(586,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','221','578','Constructions',0,NULL,NULL,1,NULL,NULL),(587,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2210','586','Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(588,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2211','586','Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(589,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2212','586','Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(590,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2213','586','Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(591,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2215','586','Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(592,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2216','586','Frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(593,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2218','586','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(594,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22180','593','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(595,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22181','593','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(596,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22182','593','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(597,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22184','593','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(598,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2219','586','Amortissements sur constructions',0,NULL,NULL,1,NULL,NULL),(599,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22190','598','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(600,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22191','598','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(601,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22192','598','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(602,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22194','598','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(603,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22195','598','Sur constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(604,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22196','598','Sur frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(605,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','222','578','Terrains bâtis',0,NULL,NULL,1,NULL,NULL),(606,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2220','605','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(607,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22200','606','Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(608,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22201','606','Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(609,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22202','606','Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(610,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22203','606','Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(611,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22204','606','Frais d\'acquisition des terrains à bâtir',0,NULL,NULL,1,NULL,NULL),(612,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2228','605','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(613,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22280','612','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(614,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22281','612','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(615,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22282','612','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(616,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22283','612','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(617,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2229','605','Amortissements sur terrains bâtis',0,NULL,NULL,1,NULL,NULL),(618,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22290','617','Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(619,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22291','617','Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(620,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22292','617','Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(621,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22293','617','Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(622,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22294','617','Sur frais d\'acquisition des terrains bâtis',0,NULL,NULL,1,NULL,NULL),(623,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','223','578','Autres droits réels sur des immeubles',0,NULL,NULL,1,NULL,NULL),(624,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2230','623','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(625,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2238','623','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(626,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2239','623','Amortissements',0,NULL,NULL,1,NULL,NULL),(627,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','23','1352','Installations, machines et outillages',0,NULL,NULL,1,NULL,NULL),(628,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','230','627','Installations',0,NULL,NULL,1,NULL,NULL),(629,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300','628','Installations bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(630,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301','628','Installations bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(631,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302','628','Installations bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(632,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303','628','Installations voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(637,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2304','628','Installation de chauffage',0,NULL,NULL,1,NULL,NULL),(638,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2305','628','Installation de conditionnement d\'air',0,NULL,NULL,1,NULL,NULL),(639,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2306','628','Installation de chargement',0,NULL,NULL,1,NULL,NULL),(640,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','231','627','Machines',0,NULL,NULL,1,NULL,NULL),(641,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2310','640','Division A',0,NULL,NULL,1,NULL,NULL),(642,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2311','640','Division B',0,NULL,NULL,1,NULL,NULL),(643,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2312','640','Division C',0,NULL,NULL,1,NULL,NULL),(644,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','237','627','Outillage',0,NULL,NULL,1,NULL,NULL),(645,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2370','644','Division A',0,NULL,NULL,1,NULL,NULL),(646,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2371','644','Division B',0,NULL,NULL,1,NULL,NULL),(647,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2372','644','Division C',0,NULL,NULL,1,NULL,NULL),(648,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','238','627','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(649,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2380','648','Sur installations',0,NULL,NULL,1,NULL,NULL),(650,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2381','648','Sur machines',0,NULL,NULL,1,NULL,NULL),(651,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2382','648','Sur outillage',0,NULL,NULL,1,NULL,NULL),(652,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','239','627','Amortissements',0,NULL,NULL,1,NULL,NULL),(653,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2390','652','Sur installations',0,NULL,NULL,1,NULL,NULL),(654,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2391','652','Sur machines',0,NULL,NULL,1,NULL,NULL),(655,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2392','652','Sur outillage',0,NULL,NULL,1,NULL,NULL),(656,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24','1352','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(657,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','240','656','Mobilier',0,NULL,NULL,1,NULL,NULL),(658,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2400','656','Mobilier',0,NULL,NULL,1,NULL,NULL),(659,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24000','658','Mobilier des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(660,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24001','658','Mobilier des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(661,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24002','658','Mobilier des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(662,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24003','658','Mobilier oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(663,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2401','657','Matériel de bureau et de service social',0,NULL,NULL,1,NULL,NULL),(664,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24010','663','Des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(665,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24011','663','Des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(666,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24012','663','Des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(667,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24013','663','Des oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(668,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2408','657','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(669,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24080','668','Plus-values actées sur mobilier',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(671,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2409','657','Amortissements',0,NULL,NULL,1,NULL,NULL),(672,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24090','671','Amortissements sur mobilier',0,NULL,NULL,1,NULL,NULL),(673,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24091','671','Amortissements sur matériel de bureau et service social',0,NULL,NULL,1,NULL,NULL),(674,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','241','656','Matériel roulant',0,NULL,NULL,1,NULL,NULL),(675,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2410','674','Matériel automobile',0,NULL,NULL,1,NULL,NULL),(676,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24100','675','Voitures',0,NULL,NULL,1,NULL,NULL),(677,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24105','675','Camions',0,NULL,NULL,1,NULL,NULL),(678,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2411','674','Matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(679,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2412','674','Matériel fluvial',0,NULL,NULL,1,NULL,NULL),(680,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2413','674','Matériel naval',0,NULL,NULL,1,NULL,NULL),(681,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2414','674','Matériel aérien',0,NULL,NULL,1,NULL,NULL),(682,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2418','674','Plus-values sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(683,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24180','682','Plus-values sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(684,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24181','682','Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(685,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24182','682','Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(686,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24183','682','Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(687,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24184','682','Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(688,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2419','674','Amortissements sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(689,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24190','688','Amortissements sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(690,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24191','688','Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(691,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24192','688','Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(692,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24193','688','Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(693,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24194','688','Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(694,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','25','1352','Immobilisation détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(695,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','250','694','Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(696,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2500','695','Terrains',0,NULL,NULL,1,NULL,NULL),(697,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2501','695','Constructions',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(700,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','251','694','Installations, machines et outillage',0,NULL,NULL,1,NULL,NULL),(701,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2510','700','Installations',0,NULL,NULL,1,NULL,NULL),(702,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2511','700','Machines',0,NULL,NULL,1,NULL,NULL),(703,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2512','700','Outillage',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(705,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2519','700','Amortissements sur installations machines et outillage pris en leasing',0,NULL,NULL,1,NULL,NULL),(706,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','252','694','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(707,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2520','706','Mobilier',0,NULL,NULL,1,NULL,NULL),(708,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2521','706','Matériel roulant',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(710,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2529','706','Amortissements sur mobilier et matériel roulant en leasing',0,NULL,NULL,1,NULL,NULL),(711,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','26','1352','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(712,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','260','711','Frais d\'aménagements de locaux pris en location',0,NULL,NULL,1,NULL,NULL),(713,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','261','711','Maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(714,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','262','711','Réserve immobilière',0,NULL,NULL,1,NULL,NULL),(715,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','263','711','Matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(716,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','264','711','Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(717,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','268','711','Plus-values actées sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(718,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','269','711','Amortissements sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(720,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2691','718','Amortissements sur maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(721,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2692','718','Amortissements sur réserve immobilière',0,NULL,NULL,1,NULL,NULL),(722,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2693','718','Amortissements sur matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(723,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2694','718','Amortissements sur emballages récupérables',0,NULL,NULL,1,NULL,NULL),(724,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','27','1352','Immobilisations corporelles en cours et acomptes versés',0,NULL,NULL,1,NULL,NULL),(725,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','270','724','Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(726,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2700','725','Constructions',0,NULL,NULL,1,NULL,NULL),(727,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2701','725','Installations machines et outillage',0,NULL,NULL,1,NULL,NULL),(728,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2702','725','Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(729,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2703','725','Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(730,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','271','724','Avances et acomptes versés sur immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(731,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','28','1352','Immobilisations financières',0,NULL,NULL,1,NULL,NULL),(732,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','280','731','Participations dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(733,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2800','732','Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(734,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2801','732','Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(735,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2808','732','Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(736,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2809','732','Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(737,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','281','731','Créances sur des entreprises liées',0,NULL,NULL,1,NULL,NULL),(738,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2810','737','Créances en compte',0,NULL,NULL,1,NULL,NULL),(739,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2811','737','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(740,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2812','737','Titres à revenu fixes',0,NULL,NULL,1,NULL,NULL),(741,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2817','737','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(742,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2819','737','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(744,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2820','743','Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(745,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2821','743','Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(746,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2828','743','Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(747,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2829','743','Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(749,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2830','748','Créances en compte',0,NULL,NULL,1,NULL,NULL),(750,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2831','748','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(751,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2832','748','Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(752,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2837','748','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(753,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2839','748','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(754,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','284','731','Autres actions et parts',0,NULL,NULL,1,NULL,NULL),(755,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2840','754','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(756,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2841','754','Montants non appelés',0,NULL,NULL,1,NULL,NULL),(757,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2848','754','Plus-values actées',0,NULL,NULL,1,NULL,NULL),(758,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2849','754','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(759,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','285','731','Autres créances',0,NULL,NULL,1,NULL,NULL),(760,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2850','759','Créances en compte',0,NULL,NULL,1,NULL,NULL),(761,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2851','759','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(762,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2852','759','Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(763,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2857','759','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(764,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2859','759','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(765,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','288','731','Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(766,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2880','765','Téléphone, téléfax, télex',0,NULL,NULL,1,NULL,NULL),(767,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2881','765','Gaz',0,NULL,NULL,1,NULL,NULL),(768,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2882','765','Eau',0,NULL,NULL,1,NULL,NULL),(769,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2883','765','Electricité',0,NULL,NULL,1,NULL,NULL),(770,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2887','765','Autres cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(771,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29','1352','Créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(772,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','290','771','Créances commerciales',0,NULL,NULL,1,NULL,NULL),(773,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2900','772','Clients',0,NULL,NULL,1,NULL,NULL),(774,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29000','773','Créances en compte sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(776,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29002','773','Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(777,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29003','773','Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(778,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29004','773','Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(779,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29005','773','Créances sur les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(780,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2901','772','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(781,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29010','780','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(783,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29012','780','Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(784,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29013','780','Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(785,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29014','780','Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(786,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2905','772','Retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(787,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2906','772','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(788,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2907','772','Créances douteuses (à ventiler comme clients 2900)',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(790,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','291','771','Autres créances',0,NULL,NULL,1,NULL,NULL),(791,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2910','790','Créances en compte',0,NULL,NULL,1,NULL,NULL),(792,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29100','791','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(794,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29102','791','Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(795,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2911','790','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(796,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29110','795','Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(798,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29112','795','Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(800,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2917','790','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(801,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2919','790','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(802,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','30','1353','Approvisionnements - matières premières',0,NULL,NULL,1,NULL,NULL),(803,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','300','802','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(804,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','309','802','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(805,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31','1353','Approvsionnements et fournitures',0,NULL,NULL,1,NULL,NULL),(806,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','310','805','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(807,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3100','806','Matières d\'approvisionnement',0,NULL,NULL,1,NULL,NULL),(808,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3101','806','Energie, charbon, coke, mazout, essence, propane',0,NULL,NULL,1,NULL,NULL),(809,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3102','806','Produits d\'entretien',0,NULL,NULL,1,NULL,NULL),(810,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3103','806','Fournitures diverses et petit outillage',0,NULL,NULL,1,NULL,NULL),(811,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3104','806','Imprimés et fournitures de bureau',0,NULL,NULL,1,NULL,NULL),(812,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3105','806','Fournitures de services sociaux',0,NULL,NULL,1,NULL,NULL),(813,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3106','806','Emballages commerciaux',0,NULL,NULL,1,NULL,NULL),(814,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31060','813','Emballages perdus',0,NULL,NULL,1,NULL,NULL),(815,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31061','813','Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(816,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','319','805','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(817,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','32','1353','En cours de fabrication',0,NULL,NULL,1,NULL,NULL),(818,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','320','817','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(819,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3200','818','Produits semi-ouvrés',0,NULL,NULL,1,NULL,NULL),(820,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3201','818','Produits en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(821,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3202','818','Travaux en cours',0,NULL,NULL,1,NULL,NULL),(822,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3205','818','Déchets',0,NULL,NULL,1,NULL,NULL),(823,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3206','818','Rebuts',0,NULL,NULL,1,NULL,NULL),(824,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3209','818','Travaux en association momentanée',0,NULL,NULL,1,NULL,NULL),(825,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','329','817','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(826,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','33','1353','Produits finis',0,NULL,NULL,1,NULL,NULL),(827,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','330','826','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(828,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3300','827','Produits finis',0,NULL,NULL,1,NULL,NULL),(829,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','339','826','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(830,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','34','1353','Marchandises',0,NULL,NULL,1,NULL,NULL),(831,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','340','830','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(832,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3400','831','Groupe A',0,NULL,NULL,1,NULL,NULL),(833,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3401','831','Groupe B',0,NULL,NULL,1,NULL,NULL),(834,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3402','831','Groupe C',0,NULL,NULL,1,NULL,NULL),(835,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','349','830','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(836,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','35','1353','Immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(837,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','350','836','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(838,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3500','837','Immeuble A',0,NULL,NULL,1,NULL,NULL),(839,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3501','837','Immeuble B',0,NULL,NULL,1,NULL,NULL),(840,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3502','837','Immeuble C',0,NULL,NULL,1,NULL,NULL),(841,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','351','836','Immeubles construits en vue de leur revente',0,NULL,NULL,1,NULL,NULL),(842,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3510','841','Immeuble A',0,NULL,NULL,1,NULL,NULL),(843,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3511','841','Immeuble B',0,NULL,NULL,1,NULL,NULL),(844,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3512','841','Immeuble C',0,NULL,NULL,1,NULL,NULL),(845,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','359','836','Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(846,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','36','1353','Acomptes versés sur achats pour stocks',0,NULL,NULL,1,NULL,NULL),(847,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','360','846','Acomptes versés (à ventiler éventuellement par catégorie)',0,NULL,NULL,1,NULL,NULL),(848,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','369','846','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(849,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','37','1353','Commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(850,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','370','849','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(851,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','371','849','Bénéfice pris en compte',0,NULL,NULL,1,NULL,NULL),(852,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','379','849','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(853,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','40','1354','Créances commerciales',0,NULL,NULL,1,NULL,NULL),(854,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','400','853','Clients',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(857,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','401','853','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(858,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4010','857','Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(859,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4013','857','Effets à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(860,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4015','857','Effets à l\'escompte',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(862,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4020','861','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(864,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4022','861','Administrateurs et gérants d\'entreprise',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(866,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4030','865','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(868,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4032','865','Administrateurs et gérants de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(869,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','404','853','Produits à recevoir (factures à établir)',0,NULL,NULL,1,NULL,NULL),(870,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','405','853','Clients : retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(871,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','406','853','Acomptes versés',0,NULL,NULL,1,NULL,NULL),(872,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','407','853','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(873,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','408','853','Compensation clients',0,NULL,NULL,1,NULL,NULL),(874,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','409','853','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(875,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41','1354','Autres créances',0,NULL,NULL,1,NULL,NULL),(876,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','410','875','Capital appelé, non versé',0,NULL,NULL,1,NULL,NULL),(877,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4100','876','Appels de fonds',0,NULL,NULL,1,NULL,NULL),(878,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4101','876','Actionnaires défaillants',0,NULL,NULL,1,NULL,NULL),(879,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','411','875','T.V.A. à récupérer',0,NULL,NULL,1,NULL,NULL),(880,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4110','879','T.V.A. due',0,NULL,NULL,1,NULL,NULL),(881,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4111','879','T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(882,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4112','879','Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(883,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4118','879','Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(884,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','412','875','Impôts et versements fiscaux à récupérer',0,NULL,NULL,1,NULL,NULL),(885,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4120','884','Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(886,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4125','884','Autres impôts belges',0,NULL,NULL,1,NULL,NULL),(887,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4128','884','Impôts étrangers',0,NULL,NULL,1,NULL,NULL),(888,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','414','875','Produits à recevoir',0,NULL,NULL,1,NULL,NULL),(889,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','416','875','Créances diverses',0,NULL,NULL,1,NULL,NULL),(890,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4160','889','Associés (compte d\'apport en société)',0,NULL,NULL,1,NULL,NULL),(891,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4161','889','Avances et prêts au personnel',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(893,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4163','889','Compte courant des administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(894,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4164','889','Créances sur sociétés apparentées',0,NULL,NULL,1,NULL,NULL),(895,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4166','889','Emballages et matériel à rendre',0,NULL,NULL,1,NULL,NULL),(896,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4167','889','Etat et établissements publics',0,NULL,NULL,1,NULL,NULL),(897,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41670','896','Subsides à recevoir',0,NULL,NULL,1,NULL,NULL),(898,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41671','896','Autres créances',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(900,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','417','875','Créances douteuses',0,NULL,NULL,1,NULL,NULL),(901,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','418','875','Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(902,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','419','875','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(904,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','420','903','Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(905,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4200','904','Convertibles',0,NULL,NULL,1,NULL,NULL),(906,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4201','904','Non convertibles',0,NULL,NULL,1,NULL,NULL),(907,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','421','903','Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(908,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4210','907','Convertibles',0,NULL,NULL,1,NULL,NULL),(909,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4211','907','Non convertibles',0,NULL,NULL,1,NULL,NULL),(910,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','422','903','Dettes de location-financement et assimilées',0,NULL,NULL,1,NULL,NULL),(911,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4220','910','Financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(912,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4221','910','Financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(913,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','423','903','Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(914,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4230','913','Dettes en compte',0,NULL,NULL,1,NULL,NULL),(915,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4231','913','Promesses',0,NULL,NULL,1,NULL,NULL),(916,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4232','913','Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(917,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','424','903','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(918,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','425','903','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(919,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4250','918','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(920,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4251','918','Effets à payer',0,NULL,NULL,1,NULL,NULL),(921,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','426','903','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(922,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','429','903','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(923,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4290','922','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(924,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4291','922','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(925,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4292','922','Administrateurs, gérants, associés',0,NULL,NULL,1,NULL,NULL),(926,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4299','922','Autres dettes',0,NULL,NULL,1,NULL,NULL),(927,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','43','1354','Dettes financières',0,NULL,NULL,1,NULL,NULL),(928,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','430','927','Etablissements de crédit. Emprunts en compte à terme fixe',0,NULL,NULL,1,NULL,NULL),(929,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','431','927','Etablissements de crédit. Promesses',0,NULL,NULL,1,NULL,NULL),(930,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','432','927','Etablissements de crédit. Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(931,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','433','927','Etablissements de crédit. Dettes en compte courant',0,NULL,NULL,1,NULL,NULL),(932,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','439','927','Autres emprunts',0,NULL,NULL,1,NULL,NULL),(933,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44','1354','Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(934,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','440','933','Fournisseurs',0,NULL,NULL,1,NULL,NULL),(935,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4400','934','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(936,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44000','935','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(937,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44001','935','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(938,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4401','934','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(939,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44010','938','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(940,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44011','938','Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(941,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44012','938','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(942,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4402','934','Dettes envers les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(943,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4403','934','Fournisseurs - retenues de garanties',0,NULL,NULL,1,NULL,NULL),(944,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','441','933','Effets à payer',0,NULL,NULL,1,NULL,NULL),(945,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4410','944','Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(946,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44100','945','Entreprises liées',0,NULL,NULL,1,NULL,NULL),(947,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44101','945','Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(948,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4411','944','Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(949,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44110','948','Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(950,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44111','948','Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(951,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44112','948','Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(952,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','444','933','Factures à recevoir',0,NULL,NULL,1,NULL,NULL),(953,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','446','933','Acomptes reçus',0,NULL,NULL,1,NULL,NULL),(954,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','448','933','Compensations fournisseurs',0,NULL,NULL,1,NULL,NULL),(955,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45','1354','Dettes fiscales, salariales et sociales',0,NULL,NULL,1,NULL,NULL),(956,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','450','955','Dettes fiscales estimées',0,NULL,NULL,1,NULL,NULL),(957,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4501','956','Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(958,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4505','956','Autres impôts en Belgique',0,NULL,NULL,1,NULL,NULL),(959,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4508','956','Impôts à l\'étranger',0,NULL,NULL,1,NULL,NULL),(960,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','451','955','T.V.A. à payer',0,NULL,NULL,1,NULL,NULL),(961,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4510','960','T.V.A. due',0,NULL,NULL,1,NULL,NULL),(962,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4511','960','T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(963,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4512','960','Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(964,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4518','960','Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(965,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','452','955','Impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(966,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4520','965','Autres impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(967,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4525','965','Autres impôts et taxes en Belgique',0,NULL,NULL,1,NULL,NULL),(968,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45250','967','Précompte immobilier',0,NULL,NULL,1,NULL,NULL),(969,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45251','967','Impôts communaux à payer',0,NULL,NULL,1,NULL,NULL),(970,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45252','967','Impôts provinciaux à payer',0,NULL,NULL,1,NULL,NULL),(971,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45253','967','Autres impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(972,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4528','965','Impôts et taxes à l\'étranger',0,NULL,NULL,1,NULL,NULL),(973,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','453','955','Précomptes retenus',0,NULL,NULL,1,NULL,NULL),(974,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4530','973','Précompte professionnel retenu sur rémunérations',0,NULL,NULL,1,NULL,NULL),(975,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4531','973','Précompte professionnel retenu sur tantièmes',0,NULL,NULL,1,NULL,NULL),(976,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4532','973','Précompte mobilier retenu sur dividendes attribués',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(978,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4538','973','Autres précomptes retenus',0,NULL,NULL,1,NULL,NULL),(979,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','454','955','Office National de la Sécurité Sociale',0,NULL,NULL,1,NULL,NULL),(980,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4540','979','Arriérés',0,NULL,NULL,1,NULL,NULL),(981,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4541','979','1er trimestre',0,NULL,NULL,1,NULL,NULL),(982,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4542','979','2ème trimestre',0,NULL,NULL,1,NULL,NULL),(983,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4543','979','3ème trimestre',0,NULL,NULL,1,NULL,NULL),(984,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4544','979','4ème trimestre',0,NULL,NULL,1,NULL,NULL),(985,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','455','955','Rémunérations',0,NULL,NULL,1,NULL,NULL),(986,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4550','985','Administrateurs, gérants et commissaires (non réviseurs)',0,NULL,NULL,1,NULL,NULL),(987,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4551','985','Direction',0,NULL,NULL,1,NULL,NULL),(988,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4552','985','Employés',0,NULL,NULL,1,NULL,NULL),(989,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4553','985','Ouvriers',0,NULL,NULL,1,NULL,NULL),(990,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','456','955','Pécules de vacances',0,NULL,NULL,1,NULL,NULL),(991,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4560','990','Direction',0,NULL,NULL,1,NULL,NULL),(992,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4561','990','Employés',0,NULL,NULL,1,NULL,NULL),(993,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4562','990','Ouvriers',0,NULL,NULL,1,NULL,NULL),(994,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','459','955','Autres dettes sociales',0,NULL,NULL,1,NULL,NULL),(995,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4590','994','Provision pour gratifications de fin d\'année',0,NULL,NULL,1,NULL,NULL),(996,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4591','994','Départs de personnel',0,NULL,NULL,1,NULL,NULL),(997,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4592','994','Oppositions sur rémunérations',0,NULL,NULL,1,NULL,NULL),(998,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4593','994','Assurances relatives au personnel',0,NULL,NULL,1,NULL,NULL),(999,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45930','998','Assurance loi',0,NULL,NULL,1,NULL,NULL),(1000,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45931','998','Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1001,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45932','998','Assurance groupe',0,NULL,NULL,1,NULL,NULL),(1002,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45933','998','Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1003,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4594','994','Caisse d\'assurances sociales pour travailleurs indépendants',0,NULL,NULL,1,NULL,NULL),(1004,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4597','994','Dettes et provisions sociales diverses',0,NULL,NULL,1,NULL,NULL),(1005,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','46','1354','Acomptes reçus sur commande',0,NULL,NULL,1,NULL,NULL),(1006,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','47','1354','Dettes découlant de l\'affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1007,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','470','1006','Dividendes et tantièmes d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1008,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','471','1006','Dividendes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1009,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','472','1006','Tantièmes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1010,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','473','1006','Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1011,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','48','4','Dettes diverses',0,NULL,NULL,1,NULL,NULL),(1012,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','480','1011','Obligations et coupons échus',0,NULL,NULL,1,NULL,NULL),(1013,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','481','1011','Actionnaires - capital à rembourser',0,NULL,NULL,1,NULL,NULL),(1014,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','482','1011','Participation du personnel à payer',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1016,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','486','1011','Emballages et matériel consignés',0,NULL,NULL,1,NULL,NULL),(1017,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','488','1011','Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(1018,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','489','1011','Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(1019,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49','1354','Comptes de régularisation et compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1020,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','490','1019','Charges à reporter (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1021,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','491','1019','Produits acquis',0,NULL,NULL,1,NULL,NULL),(1022,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4910','1021','Produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1023,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49100','1022','Ristournes et rabais à obtenir',0,NULL,NULL,1,NULL,NULL),(1024,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49101','1022','Commissions à obtenir',0,NULL,NULL,1,NULL,NULL),(1025,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49102','1022','Autres produits d\'exploitation (redevances par exemple)',0,NULL,NULL,1,NULL,NULL),(1026,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4911','1021','Produits financiers',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1028,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49111','1026','Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(1029,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','492','1019','Charges à imputer (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1030,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','493','1019','Produits à reporter',0,NULL,NULL,1,NULL,NULL),(1031,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4930','1030','Produits d\'exploitation à reporter',0,NULL,NULL,1,NULL,NULL),(1032,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4931','1030','Produits financiers à reporter',0,NULL,NULL,1,NULL,NULL),(1033,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','499','1019','Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(1034,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4990','1033','Compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1035,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4991','1033','Compte de répartition périodique des charges',0,NULL,NULL,1,NULL,NULL),(1036,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4999','1033','Transferts d\'exercice',0,NULL,NULL,1,NULL,NULL),(1037,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','50','1355','Actions propres',0,NULL,NULL,1,NULL,NULL),(1038,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','51','1355','Actions et parts',0,NULL,NULL,1,NULL,NULL),(1039,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','510','1038','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1040,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','511','1038','Montants non appelés',0,NULL,NULL,1,NULL,NULL),(1041,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','519','1038','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1042,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','52','1355','Titres à revenus fixes',0,NULL,NULL,1,NULL,NULL),(1043,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','520','1042','Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1044,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','529','1042','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1045,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','53','1355','Dépots à terme',0,NULL,NULL,1,NULL,NULL),(1046,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','530','1045','De plus d\'un an',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(1048,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','532','1045','d\'un mois au plus',0,NULL,NULL,1,NULL,NULL),(1049,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','539','1045','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1050,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','54','1355','Valeurs échues à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(1051,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','540','1050','Chèques à encaisser',0,NULL,NULL,1,NULL,NULL),(1052,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','541','1050','Coupons à encaisser',0,NULL,NULL,1,NULL,NULL),(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.',0,NULL,NULL,1,NULL,NULL),(1054,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','550','1053','Comptes courants',0,NULL,NULL,1,NULL,NULL),(1055,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','551','1053','Chèques émis',0,NULL,NULL,1,NULL,NULL),(1056,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','559','1053','Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1057,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','56','1355','Office des chèques postaux',0,NULL,NULL,1,NULL,NULL),(1058,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','560','1057','Compte courant',0,NULL,NULL,1,NULL,NULL),(1059,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','561','1057','Chèques émis',0,NULL,NULL,1,NULL,NULL),(1060,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','57','1355','Caisses',0,NULL,NULL,1,NULL,NULL),(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)',0,NULL,NULL,1,NULL,NULL),(1062,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','578','1060','Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',0,NULL,NULL,1,NULL,NULL),(1063,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','58','1355','Virements internes',0,NULL,NULL,1,NULL,NULL),(1064,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','60','1356','Approvisionnements et marchandises',0,NULL,NULL,1,NULL,NULL),(1065,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','600','1064','Achats de matières premières',0,NULL,NULL,1,NULL,NULL),(1066,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','601','1064','Achats de fournitures',0,NULL,NULL,1,NULL,NULL),(1067,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','602','1064','Achats de services, travaux et études',0,NULL,NULL,1,NULL,NULL),(1068,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','603','1064','Sous-traitances générales',0,NULL,NULL,1,NULL,NULL),(1069,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','604','1064','Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(1070,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','605','1064','Achats d\'immeubles destinés à la revente',0,NULL,NULL,1,NULL,NULL),(1071,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','608','1064','Remises , ristournes et rabais obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(1072,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','609','1064','Variations de stocks',0,NULL,NULL,1,NULL,NULL),(1073,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6090','1072','De matières premières',0,NULL,NULL,1,NULL,NULL),(1074,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6091','1072','De fournitures',0,NULL,NULL,1,NULL,NULL),(1075,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6094','1072','De marchandises',0,NULL,NULL,1,NULL,NULL),(1076,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6095','1072','d\'immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1077,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61','1356','Services et biens divers',0,NULL,NULL,1,NULL,NULL),(1078,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','610','1077','Loyers et charges locatives',0,NULL,NULL,1,NULL,NULL),(1079,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6100','1078','Loyers divers',0,NULL,NULL,1,NULL,NULL),(1080,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6101','1078','Charges locatives (assurances, frais de confort,etc)',0,NULL,NULL,1,NULL,NULL),(1081,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','611','1077','Entretien et réparation (fournitures et prestations)',0,NULL,NULL,1,NULL,NULL),(1082,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','612','1077','Fournitures faites à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1083,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6120','1082','Eau, gaz, électricité, vapeur',0,NULL,NULL,1,NULL,NULL),(1084,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61200','1083','Eau',0,NULL,NULL,1,NULL,NULL),(1085,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61201','1083','Gaz',0,NULL,NULL,1,NULL,NULL),(1086,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61202','1083','Electricité',0,NULL,NULL,1,NULL,NULL),(1087,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61203','1083','Vapeur',0,NULL,NULL,1,NULL,NULL),(1088,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6121','1082','Téléphone, télégrammes, télex, téléfax, frais postaux',0,NULL,NULL,1,NULL,NULL),(1089,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61210','1088','Téléphone',0,NULL,NULL,1,NULL,NULL),(1090,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61211','1088','Télégrammes',0,NULL,NULL,1,NULL,NULL),(1091,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61212','1088','Télex et téléfax',0,NULL,NULL,1,NULL,NULL),(1092,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61213','1088','Frais postaux',0,NULL,NULL,1,NULL,NULL),(1093,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6122','1082','Livres, bibliothèque',0,NULL,NULL,1,NULL,NULL),(1094,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6123','1082','Imprimés et fournitures de bureau (si non comptabilisé au 601)',0,NULL,NULL,1,NULL,NULL),(1095,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','613','1077','Rétributions de tiers',0,NULL,NULL,1,NULL,NULL),(1096,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6130','1095','Redevances et royalties',0,NULL,NULL,1,NULL,NULL),(1097,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61300','1096','Redevances pour brevets, licences, marques et accessoires',0,NULL,NULL,1,NULL,NULL),(1098,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61301','1096','Autres redevances (procédés de fabrication)',0,NULL,NULL,1,NULL,NULL),(1099,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6131','1095','Assurances non relatives au personnel',0,NULL,NULL,1,NULL,NULL),(1100,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61310','1099','Assurance incendie',0,NULL,NULL,1,NULL,NULL),(1101,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61311','1099','Assurance vol',0,NULL,NULL,1,NULL,NULL),(1102,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61312','1099','Assurance autos',0,NULL,NULL,1,NULL,NULL),(1103,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61313','1099','Assurance crédit',0,NULL,NULL,1,NULL,NULL),(1104,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61314','1099','Assurances frais généraux',0,NULL,NULL,1,NULL,NULL),(1105,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6132','1095','Divers',0,NULL,NULL,1,NULL,NULL),(1106,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61320','1105','Commissions aux tiers',0,NULL,NULL,1,NULL,NULL),(1107,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61321','1105','Honoraires d\'avocats, d\'experts, etc',0,NULL,NULL,1,NULL,NULL),(1108,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61322','1105','Cotisations aux groupements professionnels',0,NULL,NULL,1,NULL,NULL),(1109,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61323','1105','Dons, libéralités, etc',0,NULL,NULL,1,NULL,NULL),(1110,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61324','1105','Frais de contentieux',0,NULL,NULL,1,NULL,NULL),(1111,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61325','1105','Publications légales',0,NULL,NULL,1,NULL,NULL),(1112,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6133','1095','Transports et déplacements',0,NULL,NULL,1,NULL,NULL),(1113,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61330','1112','Transports de personnel',0,NULL,NULL,1,NULL,NULL),(1114,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61331','1112','Voyages, déplacements et représentations',0,NULL,NULL,1,NULL,NULL),(1115,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6134','1095','Personnel intérimaire',0,NULL,NULL,1,NULL,NULL),(1116,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','614','1077','Annonces, publicité, propagande et documentation',0,NULL,NULL,1,NULL,NULL),(1117,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6140','1116','Annonces et insertions',0,NULL,NULL,1,NULL,NULL),(1118,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6141','1116','Catalogues et imprimés',0,NULL,NULL,1,NULL,NULL),(1119,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6142','1116','Echantillons',0,NULL,NULL,1,NULL,NULL),(1120,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6143','1116','Foires et expositions',0,NULL,NULL,1,NULL,NULL),(1121,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6144','1116','Primes',0,NULL,NULL,1,NULL,NULL),(1122,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6145','1116','Cadeaux à la clientèle',0,NULL,NULL,1,NULL,NULL),(1123,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6146','1116','Missions et réceptions',0,NULL,NULL,1,NULL,NULL),(1124,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6147','1116','Documentation',0,NULL,NULL,1,NULL,NULL),(1125,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','615','1077','Sous-traitants',0,NULL,NULL,1,NULL,NULL),(1126,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6150','1125','Sous-traitants pour activités propres',0,NULL,NULL,1,NULL,NULL),(1127,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6151','1125','Sous-traitants d\'associations momentanées (coparticipants)',0,NULL,NULL,1,NULL,NULL),(1128,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6152','1125','Quote-part bénéficiaire des coparticipants',0,NULL,NULL,1,NULL,NULL),(1129,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','617','1077','Personnel intérimaire et personnes mises à la disposition de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1130,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','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',0,NULL,NULL,1,NULL,NULL),(1131,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62','1356','Rémunérations, charges sociales et pensions',0,NULL,NULL,1,NULL,NULL),(1132,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','620','1131','Rémunérations et avantages sociaux directs',0,NULL,NULL,1,NULL,NULL),(1133,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6200','1132','Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1134,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6201','1132','Personnel de direction',0,NULL,NULL,1,NULL,NULL),(1135,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6202','1132','Employés',0,NULL,NULL,1,NULL,NULL),(1136,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6203','1132','Ouvriers',0,NULL,NULL,1,NULL,NULL),(1137,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6204','1132','Autres membres du personnel',0,NULL,NULL,1,NULL,NULL),(1138,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','621','1131','Cotisations patronales d\'assurances sociales',0,NULL,NULL,1,NULL,NULL),(1139,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6210','1138','Sur salaires',0,NULL,NULL,1,NULL,NULL),(1140,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6211','1138','Sur appointements et commissions',0,NULL,NULL,1,NULL,NULL),(1141,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','622','1131','Primes patronales pour assurances extralégales',0,NULL,NULL,1,NULL,NULL),(1142,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','623','1131','Autres frais de personnel',0,NULL,NULL,1,NULL,NULL),(1143,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6230','1142','Assurances du personnel',0,NULL,NULL,1,NULL,NULL),(1144,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62300','1143','Assurances loi, responsabilité civile, chemin du travail',0,NULL,NULL,1,NULL,NULL),(1145,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62301','1143','Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1146,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62302','1143','Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1147,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6231','1142','Charges sociales diverses',0,NULL,NULL,1,NULL,NULL),(1148,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62310','1147','Jours fériés payés',0,NULL,NULL,1,NULL,NULL),(1149,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62311','1147','Salaire hebdomadaire garanti',0,NULL,NULL,1,NULL,NULL),(1150,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62312','1147','Allocations familiales complémentaires',0,NULL,NULL,1,NULL,NULL),(1151,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6232','1142','Charges sociales des administrateurs, gérants et commissaires',0,NULL,NULL,1,NULL,NULL),(1152,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62320','1151','Allocations familiales complémentaires pour non salariés',0,NULL,NULL,1,NULL,NULL),(1153,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62321','1151','Lois sociales pour indépendants',0,NULL,NULL,1,NULL,NULL),(1154,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62322','1151','Divers',0,NULL,NULL,1,NULL,NULL),(1155,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','624','1131','Pensions de retraite et de survie',0,NULL,NULL,1,NULL,NULL),(1156,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6240','1155','Administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(1157,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6241','1155','Personnel',0,NULL,NULL,1,NULL,NULL),(1158,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','625','1131','Provision pour pécule de vacances',0,NULL,NULL,1,NULL,NULL),(1159,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6250','1158','Dotations',0,NULL,NULL,1,NULL,NULL),(1160,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6251','1158','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1161,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','63','1356','Amortissements, réductions de valeur et provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(1162,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','630','1161','Dotations aux amortissements et aux réductions de valeur sur immobilisations',0,NULL,NULL,1,NULL,NULL),(1163,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6300','1162','Dotations aux amortissements sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1164,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6301','1162','Dotations aux amortissements sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1165,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6302','1162','Dotations aux amortissements sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1166,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6308','1162','Dotations aux réductions de valeur sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1167,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6309','1162','Dotations aux réductions de valeur sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1168,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','631','1161','Réductions de valeur sur stocks',0,NULL,NULL,1,NULL,NULL),(1169,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6310','1168','Dotations',0,NULL,NULL,1,NULL,NULL),(1170,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6311','1168','Reprises',0,NULL,NULL,1,NULL,NULL),(1171,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','632','1161','Réductions de valeur sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1172,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6320','1171','Dotations',0,NULL,NULL,1,NULL,NULL),(1173,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6321','1171','Reprises',0,NULL,NULL,1,NULL,NULL),(1174,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','633','1161','Réductions de valeur sur créances commerciales à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1175,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6330','1174','Dotations',0,NULL,NULL,1,NULL,NULL),(1176,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6331','1174','Reprises',0,NULL,NULL,1,NULL,NULL),(1177,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','634','1161','Réductions de valeur sur créances commerciales à un an au plus',0,NULL,NULL,1,NULL,NULL),(1178,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6340','1177','Dotations',0,NULL,NULL,1,NULL,NULL),(1179,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6341','1177','Reprises',0,NULL,NULL,1,NULL,NULL),(1180,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','635','1161','Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(1181,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6350','1180','Dotations',0,NULL,NULL,1,NULL,NULL),(1182,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6351','1180','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1183,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','636','11613','Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(1184,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6360','1183','Dotations',0,NULL,NULL,1,NULL,NULL),(1185,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6361','1183','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1186,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','637','1161','Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(1187,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6370','1186','Dotations',0,NULL,NULL,1,NULL,NULL),(1188,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6371','1186','Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1189,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64','1356','Autres charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1190,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','640','1189','Charges fiscales d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1191,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6400','1190','Taxes et impôts directs',0,NULL,NULL,1,NULL,NULL),(1192,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64000','1191','Taxes sur autos et camions',0,NULL,NULL,1,NULL,NULL),(1193,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6401','1190','Taxes et impôts indirects',0,NULL,NULL,1,NULL,NULL),(1194,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64010','1193','Timbres fiscaux pris en charge par la firme',0,NULL,NULL,1,NULL,NULL),(1195,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64011','1193','Droits d\'enregistrement',0,NULL,NULL,1,NULL,NULL),(1196,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64012','1193','T.V.A. non déductible',0,NULL,NULL,1,NULL,NULL),(1197,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6402','1190','Impôts provinciaux et communaux',0,NULL,NULL,1,NULL,NULL),(1198,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64020','1197','Taxe sur la force motrice',0,NULL,NULL,1,NULL,NULL),(1199,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64021','1197','Taxe sur le personnel occupé',0,NULL,NULL,1,NULL,NULL),(1200,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6403','1190','Taxes diverses',0,NULL,NULL,1,NULL,NULL),(1201,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','641','1189','Moins-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1202,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','642','1189','Moins-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1203,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','643','1189','à 648 Charges d\'exploitations diverses',0,NULL,NULL,1,NULL,NULL),(1204,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','649','1189','Charges d\'exploitation portées à l\'actif au titre de restructuration',0,NULL,NULL,1,NULL,NULL),(1205,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','65','1356','Charges financières',0,NULL,NULL,1,NULL,NULL),(1206,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','650','1205','Charges des dettes',0,NULL,NULL,1,NULL,NULL),(1207,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6500','1206','Intérêts, commissions et frais afférents aux dettes',0,NULL,NULL,1,NULL,NULL),(1208,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6501','1206','Amortissements des agios et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(1209,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6502','1206','Autres charges de dettes',0,NULL,NULL,1,NULL,NULL),(1210,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6503','1206','Intérêts intercalaires portés à l\'actif',0,NULL,NULL,1,NULL,NULL),(1211,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','651','1205','Réductions de valeur sur actifs circulants',0,NULL,NULL,1,NULL,NULL),(1212,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6510','1211','Dotations',0,NULL,NULL,1,NULL,NULL),(1213,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6511','1211','Reprises',0,NULL,NULL,1,NULL,NULL),(1214,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','652','1205','Moins-values sur réalisation d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1215,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','653','1205','Charges d\'escompte de créances',0,NULL,NULL,1,NULL,NULL),(1216,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','654','1205','Différences de change',0,NULL,NULL,1,NULL,NULL),(1217,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','655','1205','Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1218,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','656','1205','Frais de banques, de chèques postaux',0,NULL,NULL,1,NULL,NULL),(1219,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','657','1205','Commissions sur ouvertures de crédit, cautions et avals',0,NULL,NULL,1,NULL,NULL),(1220,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','658','1205','Frais de vente des titres',0,NULL,NULL,1,NULL,NULL),(1221,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','66','1356','Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1222,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','660','1221','Amortissements et réductions de valeur exceptionnels',0,NULL,NULL,1,NULL,NULL),(1223,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6600','1222','Sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1224,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6601','1222','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1225,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6602','1222','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1226,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','661','1221','Réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1227,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','662','1221','Provisions pour risques et charges exceptionnels',0,NULL,NULL,1,NULL,NULL),(1228,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','663','1221','Moins-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1229,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6630','1228','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1230,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6631','1228','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1231,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6632','1228','Sur immobilisations détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(1232,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6633','1228','Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1233,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6634','1228','Sur immeubles acquis ou construits en vue de la revente',0,NULL,NULL,1,NULL,NULL),(1234,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','664','1221','à 668 Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1236,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','665','1221','Différence de charge',0,NULL,NULL,1,NULL,NULL),(1237,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','669','1221','Charges exceptionnelles transférées à l\'actif en frais de restructuration',0,NULL,NULL,1,NULL,NULL),(1238,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','67','1356','Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(1239,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','670','1238','Impôts belges sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1240,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6700','1239','Impôts et précomptes dus ou versés',0,NULL,NULL,1,NULL,NULL),(1241,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6701','1239','Excédent de versements d\'impôts et précomptes porté à l\'actif',0,NULL,NULL,1,NULL,NULL),(1242,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6702','1239','Charges fiscales estimées',0,NULL,NULL,1,NULL,NULL),(1243,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','671','1238','Impôts belges sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1244,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6710','1243','Suppléments d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1245,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6711','1243','Suppléments d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1246,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6712','1243','Provisions fiscales constituées',0,NULL,NULL,1,NULL,NULL),(1247,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','672','1238','Impôts étrangers sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1248,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','673','1238','Impôts étrangers sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1249,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','68','1356','Transferts aux réserves immunisées',0,NULL,NULL,1,NULL,NULL),(1250,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','69','1356','Affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1251,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','690','1250','Perte reportée de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1252,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','691','1250','Dotation à la réserve légale',0,NULL,NULL,1,NULL,NULL),(1253,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','692','1250','Dotation aux autres réserves',0,NULL,NULL,1,NULL,NULL),(1254,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','693','1250','Bénéfice à reporter',0,NULL,NULL,1,NULL,NULL),(1255,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','694','1250','Rémunération du capital',0,NULL,NULL,1,NULL,NULL),(1256,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','695','1250','Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1257,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','696','1250','Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1258,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','70','1357','Chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(1260,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','700','1258','Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1261,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7000','1260','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1262,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7001','1260','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1263,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7002','1260','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1264,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','701','1258','Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1265,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7010','1264','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1266,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7011','1264','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1267,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7012','1264','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1268,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','702','1258','Ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1269,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7020','1268','Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1270,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7021','1268','Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1271,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7022','1268','Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1272,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','703','1258','Ventes d\'emballages récupérables',0,NULL,NULL,1,NULL,NULL),(1273,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','704','1258','Facturations des travaux en cours (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(1274,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','705','1258','Prestations de services',0,NULL,NULL,1,NULL,NULL),(1275,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7050','1274','Prestations de services en Belgique',0,NULL,NULL,1,NULL,NULL),(1276,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7051','1274','Prestations de services dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1277,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7052','1274','Prestations de services en vue de l\'exportation',0,NULL,NULL,1,NULL,NULL),(1278,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','706','1258','Pénalités et dédits obtenus par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1279,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','708','1258','Remises, ristournes et rabais accordés',0,NULL,NULL,1,NULL,NULL),(1280,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7080','1279','Sur ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1281,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7081','1279','Sur ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1282,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7082','1279','Sur ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1283,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7083','1279','Sur prestations de services',0,NULL,NULL,1,NULL,NULL),(1284,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7084','1279','Mali sur travaux facturés aux associations momentanées',0,NULL,NULL,1,NULL,NULL),(1285,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71','1357','Variation des stocks et des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1286,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','712','1285','Des en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(1287,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','713','1285','Des produits finis',0,NULL,NULL,1,NULL,NULL),(1288,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','715','1285','Des immeubles construits destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1289,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','717','1285','Des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1290,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7170','1289','Commandes en cours - Coût de revient',0,NULL,NULL,1,NULL,NULL),(1291,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71700','1290','Coût des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1292,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71701','1290','Coût des travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1293,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7171','1289','Bénéfices portés en compte sur commandes en cours',0,NULL,NULL,1,NULL,NULL),(1294,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71710','1293','Sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1295,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71711','1293','Sur travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1296,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','72','1357','Production immobilisée',0,NULL,NULL,1,NULL,NULL),(1297,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','720','1296','En frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1298,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','721','1296','En immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1299,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','722','1296','En immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1300,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','723','1296','En immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(1301,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','74','1357','Autres produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1302,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','740','1301','Subsides d\'exploitation et montants compensatoires',0,NULL,NULL,1,NULL,NULL),(1303,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','741','1301','Plus-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1304,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','742','1301','Plus-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1305,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','743','1301','à 749 Produits d\'exploitation divers',0,NULL,NULL,1,NULL,NULL),(1307,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','744','1301','Commissions et courtages',0,NULL,NULL,1,NULL,NULL),(1308,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','745','1301','Redevances pour brevets et licences',0,NULL,NULL,1,NULL,NULL),(1309,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','746','1301','Prestations de services (transports, études, etc)',0,NULL,NULL,1,NULL,NULL),(1310,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','747','1301','Revenus des immeubles affectés aux activités non professionnelles',0,NULL,NULL,1,NULL,NULL),(1311,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','748','1301','Locations diverses à caractère professionnel',0,NULL,NULL,1,NULL,NULL),(1312,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','749','1301','Produits divers',0,NULL,NULL,1,NULL,NULL),(1313,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7490','1312','Bonis sur reprises d\'emballages consignés',0,NULL,NULL,1,NULL,NULL),(1314,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7491','1312','Bonis sur travaux en associations momentanées',0,NULL,NULL,1,NULL,NULL),(1315,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','75','1357','Produits financiers',0,NULL,NULL,1,NULL,NULL),(1316,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','750','1315','Produits des immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1317,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7500','1316','Revenus des actions',0,NULL,NULL,1,NULL,NULL),(1318,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7501','1316','Revenus des obligations',0,NULL,NULL,1,NULL,NULL),(1319,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7502','1316','Revenus des créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1320,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','751','1315','Produits des actifs circulants',0,NULL,NULL,1,NULL,NULL),(1321,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','752','1315','Plus-values sur réalisations d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1322,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','753','1315','Subsides en capital et en intérêts',0,NULL,NULL,1,NULL,NULL),(1323,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','754','1315','Différences de change',0,NULL,NULL,1,NULL,NULL),(1324,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','755','1315','Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1325,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','756','1315','à 759 Produits financiers divers',0,NULL,NULL,1,NULL,NULL),(1327,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','757','1315','Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(1328,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','76','1357','Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1329,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','760','1328','Reprises d\'amortissements et de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(1330,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7600','1329','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1331,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7601','1329','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1332,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','761','1328','Reprises de réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1333,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','762','1328','Reprises de provisions pour risques et charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1334,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','763','1328','Plus-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1335,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7630','1334','Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1336,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7631','1334','Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1337,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7632','1334','Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1338,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','764','1328','Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1339,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','77','1357','Régularisations d\'impôts et reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1340,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','771','1339','Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(1341,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7710','1340','Régularisations d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1342,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7711','1340','Régularisations d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1343,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7712','1340','Reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1344,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','773','1339','Impôts étrangers sur le résultat',0,NULL,NULL,1,NULL,NULL),(1345,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','79','1357','Affectation aux résultats',0,NULL,NULL,1,NULL,NULL),(1346,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','790','1345','Bénéfice reporté de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1347,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','791','1345','Prélèvement sur le capital et les primes d\'émission',0,NULL,NULL,1,NULL,NULL),(1348,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','792','1345','Prélèvement sur les réserves',0,NULL,NULL,1,NULL,NULL),(1349,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','793','1345','Perte à reporter',0,NULL,NULL,1,NULL,NULL),(1350,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','794','1345','Intervention d\'associés (ou du propriétaire) dans la perte',0,NULL,NULL,1,NULL,NULL),(1351,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1352,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1353,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1354,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1355,1,NULL,'2016-07-30 11:12:54','PCMN-BASE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1356,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1357,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(1401,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1402,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1403,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1404,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1405,1,NULL,'2016-07-30 11:12:54','PCG99-ABREGE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1406,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1407,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(1501,1,NULL,'2017-02-20 10:46:43','PCG99-BASE','CAPIT','XXXXXX','1','0','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1502,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','IMMO','XXXXXX','2','0','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1503,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','STOCK','XXXXXX','3','0','Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1504,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','TIERS','XXXXXX','4','0','Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1505,1,NULL,'2016-07-30 11:12:54','PCG99-BASE','FINAN','XXXXXX','5','0','Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1506,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','6','0','Charges',0,NULL,NULL,1,NULL,NULL),(1507,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','7','0','Produits',0,NULL,NULL,1,NULL,NULL),(4001,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','FINANCIACION','XXXXXX','1','0','Financiación básica',0,NULL,NULL,1,NULL,NULL),(4002,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','ACTIVO','XXXXXX','2','0','Activo no corriente',0,NULL,NULL,1,NULL,NULL),(4003,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','EXISTENCIAS','XXXXXX','3','0','Existencias',0,NULL,NULL,1,NULL,NULL),(4004,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4','0','Acreedores y deudores por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4005,1,NULL,'2016-07-30 11:12:54','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5','0','Cuentas financieras',0,NULL,NULL,1,NULL,NULL),(4006,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6','0','Compras y gastos',0,NULL,NULL,1,NULL,NULL),(4007,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7','0','Ventas e ingresos',0,NULL,NULL,1,NULL,NULL),(4008,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','10','4001','CAPITAL',0,NULL,NULL,1,NULL,NULL),(4009,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','100','4008','Capital social',0,NULL,NULL,1,NULL,NULL),(4010,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','101','4008','Fondo social',0,NULL,NULL,1,NULL,NULL),(4011,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','CAPITAL','102','4008','Capital',0,NULL,NULL,1,NULL,NULL),(4012,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','103','4008','Socios por desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(4013,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1030','4012','Socios por desembolsos no exigidos capital social',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4015,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','104','4008','Socios por aportaciones no dineradas pendientes',0,NULL,NULL,1,NULL,NULL),(4016,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1040','4015','Socios por aportaciones no dineradas pendientes capital social',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4018,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','108','4008','Acciones o participaciones propias en situaciones especiales',0,NULL,NULL,1,NULL,NULL),(4019,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','109','4008','Acciones o participaciones propias para reducción de capital',0,NULL,NULL,1,NULL,NULL),(4020,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','11','4001','Reservas y otros instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4021,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','110','4020','Prima de emisión o asunción',0,NULL,NULL,1,NULL,NULL),(4022,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','111','4020','Otros instrumentos de patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4023,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1110','4022','Patrimonio neto por emisión de instrumentos financieros compuestos',0,NULL,NULL,1,NULL,NULL),(4024,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1111','4022','Resto de instrumentos de patrimoio neto',0,NULL,NULL,1,NULL,NULL),(4025,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','112','4020','Reserva legal',0,NULL,NULL,1,NULL,NULL),(4026,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','113','4020','Reservas voluntarias',0,NULL,NULL,1,NULL,NULL),(4027,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','114','4020','Reservas especiales',0,NULL,NULL,1,NULL,NULL),(4028,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1140','4027','Reservas para acciones o participaciones de la sociedad dominante',0,NULL,NULL,1,NULL,NULL),(4029,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1141','4027','Reservas estatutarias',0,NULL,NULL,1,NULL,NULL),(4030,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1142','4027','Reservas por capital amortizado',0,NULL,NULL,1,NULL,NULL),(4031,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1143','4027','Reservas por fondo de comercio',0,NULL,NULL,1,NULL,NULL),(4032,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1144','4028','Reservas por acciones propias aceptadas en garantía',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4034,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','118','4020','Aportaciones de socios o propietarios',0,NULL,NULL,1,NULL,NULL),(4035,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','119','4020','Diferencias por ajuste del capital a euros',0,NULL,NULL,1,NULL,NULL),(4036,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','12','4001','Resultados pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4037,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','120','4036','Remanente',0,NULL,NULL,1,NULL,NULL),(4038,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','121','4036','Resultados negativos de ejercicios anteriores',0,NULL,NULL,1,NULL,NULL),(4039,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','129','4036','Resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4040,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','13','4001','Subvenciones, donaciones y ajustes por cambio de valor',0,NULL,NULL,1,NULL,NULL),(4041,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','130','4040','Subvenciones oficiales de capital',0,NULL,NULL,1,NULL,NULL),(4042,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','131','4040','Donaciones y legados de capital',0,NULL,NULL,1,NULL,NULL),(4043,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','132','4040','Otras subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4045,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','134','4040','Operaciones de cobertura',0,NULL,NULL,1,NULL,NULL),(4046,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1340','4045','Cobertura de flujos de efectivo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4048,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','135','4040','Diferencias de conversión',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4050,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','137','4040','Ingresos fiscales a distribuir en varios ejercicios',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4053,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','14','4001','Provisiones',0,NULL,NULL,1,NULL,NULL),(4054,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','141','4053','Provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4055,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','142','4053','Provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4057,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','145','4053','Provisión para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4058,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','15','4001','Deudas a largo plazo con características especiales',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4061,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1533','4060','Desembolsos no exigidos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4062,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1534','4060','Desembolsos no exigidos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4063,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1535','4060','Desembolsos no exigidos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4064,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1536','4060','Otros desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4066,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1543','4065','Aportaciones no dinerarias pendientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4067,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1544','4065','Aportaciones no dinerarias pendientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4068,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1545','4065','Aportaciones no dinerarias pendientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4069,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1546','4065','Otras aportaciones no dinerarias pendientes',0,NULL,NULL,1,NULL,NULL),(4070,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','16','4001','Deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4075,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','161','4070','Proveedores de inmovilizado a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4076,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1613','4075','Proveedores de inmovilizado a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4077,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1614','4075','Proveedores de inmovilizado a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4078,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1615','4075','Proveedores de inmovilizado a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4079,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','162','4070','Acreedores por arrendamiento financiero a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4081,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1624','4080','Acreedores por arrendamiento financiero a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4083,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','163','4070','Otras deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4084,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1633','4083','Otras deudas a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4085,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1634','4083','Otras deudas a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4086,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1635','4083','Otras deudas a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4088,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','170','4087','Deudas a largo plazo con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4089,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','171','4087','Deudas a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4091,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','173','4087','Proveedores de inmovilizado a largo plazo',0,NULL,NULL,1,NULL,NULL),(4092,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','174','4087','Acreedores por arrendamiento financiero a largo plazo',0,NULL,NULL,1,NULL,NULL),(4093,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','175','4087','Efectos a pagar a largo plazo',0,NULL,NULL,1,NULL,NULL),(4094,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','176','4087','Pasivos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4095,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','177','4087','Obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4096,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','179','4087','Deudas representadas en otros valores negociables',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4098,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','180','4097','Fianzas recibidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4100,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','185','4097','Depositos recibidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4101,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','19','4001','Situaciones transitorias de financiación',0,NULL,NULL,1,NULL,NULL),(4102,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','190','4101','Acciones o participaciones emitidas',0,NULL,NULL,1,NULL,NULL),(4103,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','192','4101','Suscriptores de acciones',0,NULL,NULL,1,NULL,NULL),(4104,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','194','4101','Capital emitido pendiente de inscripción',0,NULL,NULL,1,NULL,NULL),(4105,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','195','4101','Acciones o participaciones emitidas consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4106,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','197','4101','Suscriptores de acciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4108,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','20','4002','Inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4109,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','200','4108','Investigación',0,NULL,NULL,1,NULL,NULL),(4110,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','201','4108','Desarrollo',0,NULL,NULL,1,NULL,NULL),(4111,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','202','4108','Concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4112,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','203','4108','Propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4113,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','205','4108','Derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4114,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','206','4108','Aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4115,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','209','4108','Anticipos para inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4116,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','21','4002','Inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4117,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','210','4116','Terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4118,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','211','4116','Construcciones',0,NULL,NULL,1,NULL,NULL),(4119,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','212','4116','Instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4120,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','213','4116','Maquinaria',0,NULL,NULL,1,NULL,NULL),(4121,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','214','4116','Utillaje',0,NULL,NULL,1,NULL,NULL),(4122,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','215','4116','Otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4123,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','216','4116','Mobiliario',0,NULL,NULL,1,NULL,NULL),(4124,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','217','4116','Equipos para procesos de información',0,NULL,NULL,1,NULL,NULL),(4125,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','218','4116','Elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4126,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','219','4116','Otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4127,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','22','4002','Inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4128,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','220','4127','Inversiones en terreons y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4129,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','221','4127','Inversiones en construcciones',0,NULL,NULL,1,NULL,NULL),(4130,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','23','4002','Inmovilizaciones materiales en curso',0,NULL,NULL,1,NULL,NULL),(4131,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','230','4130','Adaptación de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4132,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','231','4130','Construcciones en curso',0,NULL,NULL,1,NULL,NULL),(4133,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','232','4130','Instalaciones técnicas en montaje',0,NULL,NULL,1,NULL,NULL),(4134,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','233','4130','Maquinaria en montaje',0,NULL,NULL,1,NULL,NULL),(4135,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','237','4130','Equipos para procesos de información en montaje',0,NULL,NULL,1,NULL,NULL),(4136,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','239','4130','Anticipos para inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4137,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','24','4002','Inversiones financieras a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4138,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','240','4137','Participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4139,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2403','4138','Participaciones a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4140,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2404','4138','Participaciones a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4141,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2405','4138','Participaciones a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4146,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','242','4137','Créditos a largo plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4147,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2423','4146','Créditos a largo plazo a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4148,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2424','4146','Créditos a largo plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4149,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2425','4146','Créditos a largo plazo a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4154,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','25','4002','Otras inversiones financieras a largo plazo',0,NULL,NULL,1,NULL,NULL),(4155,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','250','4154','Inversiones financieras a largo plazo en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4156,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','251','4154','Valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4157,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','252','4154','Créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4159,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','254','4154','Créditos a largo plazo al personal',0,NULL,NULL,1,NULL,NULL),(4160,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','255','4154','Activos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4161,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','258','4154','Imposiciones a largo plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4163,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','26','4002','Fianzas y depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4164,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','260','4163','Fianzas constituidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(4165,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','261','4163','Depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4166,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','28','4002','Amortización acumulada del inmovilizado',0,NULL,NULL,1,NULL,NULL),(4167,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','280','4166','Amortización acumulado del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4168,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2800','4167','Amortización acumulada de investigación',0,NULL,NULL,1,NULL,NULL),(4169,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2801','4167','Amortización acumulada de desarrollo',0,NULL,NULL,1,NULL,NULL),(4170,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2802','4167','Amortización acumulada de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4171,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2803','4167','Amortización acumulada de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4172,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2805','4167','Amortización acumulada de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4173,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2806','4167','Amortización acumulada de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4174,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','281','4166','Amortización acumulado del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4175,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2811','4174','Amortización acumulada de construcciones',0,NULL,NULL,1,NULL,NULL),(4176,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2812','4174','Amortización acumulada de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4177,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2813','4174','Amortización acumulada de maquinaria',0,NULL,NULL,1,NULL,NULL),(4178,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2814','4174','Amortización acumulada de utillaje',0,NULL,NULL,1,NULL,NULL),(4179,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2815','4174','Amortización acumulada de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4180,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2816','4174','Amortización acumulada de mobiliario',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4182,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2818','4174','Amortización acumulada de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4183,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2819','4175','Amortización acumulada de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4184,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','282','4166','Amortización acumulada de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4185,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','29','4002','Deterioro de valor de activos no corrientes',0,NULL,NULL,1,NULL,NULL),(4186,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','290','4185','Deterioro de valor del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4187,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2900','4186','Deterioro de valor de investigación',0,NULL,NULL,1,NULL,NULL),(4188,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2901','4186','Deterioro de valor de desarrollo',0,NULL,NULL,1,NULL,NULL),(4189,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2902','4186','Deterioro de valor de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4190,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2903','4186','Deterioro de valor de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4191,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2905','4186','Deterioro de valor de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4192,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2906','4186','Deterioro de valor de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4193,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','291','4185','Deterioro de valor del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4194,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2910','4193','Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4195,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2911','4193','Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(4196,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2912','4193','Deterioro de valor de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4197,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2913','4193','Deterioro de valor de maquinaria',0,NULL,NULL,1,NULL,NULL),(4198,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2914','4193','Deterioro de valor de utillajes',0,NULL,NULL,1,NULL,NULL),(4199,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2915','4194','Deterioro de valor de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4200,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2916','4194','Deterioro de valor de mobiliario',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4202,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2918','4194','Deterioro de valor de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4203,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2919','4194','Deterioro de valor de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4204,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','292','4185','Deterioro de valor de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4205,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2920','4204','Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4206,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2921','4204','Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4221,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','298','4185','Deterioro de valor de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4222,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','30','4003','Comerciales',0,NULL,NULL,1,NULL,NULL),(4223,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','300','4222','Mercaderías A',0,NULL,NULL,1,NULL,NULL),(4224,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','301','4222','Mercaderías B',0,NULL,NULL,1,NULL,NULL),(4225,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','31','4003','Materias primas',0,NULL,NULL,1,NULL,NULL),(4226,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','310','4225','Materias primas A',0,NULL,NULL,1,NULL,NULL),(4227,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','311','4225','Materias primas B',0,NULL,NULL,1,NULL,NULL),(4228,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','32','4003','Otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4229,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','320','4228','Elementos y conjuntos incorporables',0,NULL,NULL,1,NULL,NULL),(4230,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','321','4228','Combustibles',0,NULL,NULL,1,NULL,NULL),(4231,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','322','4228','Repuestos',0,NULL,NULL,1,NULL,NULL),(4232,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','325','4228','Materiales diversos',0,NULL,NULL,1,NULL,NULL),(4233,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','326','4228','Embalajes',0,NULL,NULL,1,NULL,NULL),(4234,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','327','4228','Envases',0,NULL,NULL,1,NULL,NULL),(4235,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','328','4229','Material de oficina',0,NULL,NULL,1,NULL,NULL),(4236,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','33','4003','Productos en curso',0,NULL,NULL,1,NULL,NULL),(4237,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','330','4236','Productos en curos A',0,NULL,NULL,1,NULL,NULL),(4238,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','331','4236','Productos en curso B',0,NULL,NULL,1,NULL,NULL),(4239,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','34','4003','Productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4240,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','340','4239','Productos semiterminados A',0,NULL,NULL,1,NULL,NULL),(4241,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','341','4239','Productos semiterminados B',0,NULL,NULL,1,NULL,NULL),(4242,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','35','4003','Productos terminados',0,NULL,NULL,1,NULL,NULL),(4243,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','350','4242','Productos terminados A',0,NULL,NULL,1,NULL,NULL),(4244,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','351','4242','Productos terminados B',0,NULL,NULL,1,NULL,NULL),(4245,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','36','4003','Subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4246,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','360','4245','Subproductos A',0,NULL,NULL,1,NULL,NULL),(4247,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','361','4245','Subproductos B',0,NULL,NULL,1,NULL,NULL),(4248,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','365','4245','Residuos A',0,NULL,NULL,1,NULL,NULL),(4249,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','366','4245','Residuos B',0,NULL,NULL,1,NULL,NULL),(4250,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','368','4245','Materiales recuperados A',0,NULL,NULL,1,NULL,NULL),(4251,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','369','4245','Materiales recuperados B',0,NULL,NULL,1,NULL,NULL),(4252,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','39','4003','Deterioro de valor de las existencias',0,NULL,NULL,1,NULL,NULL),(4253,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','390','4252','Deterioro de valor de las mercaderías',0,NULL,NULL,1,NULL,NULL),(4254,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','391','4252','Deterioro de valor de las materias primas',0,NULL,NULL,1,NULL,NULL),(4255,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','392','4252','Deterioro de valor de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4256,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','393','4252','Deterioro de valor de los productos en curso',0,NULL,NULL,1,NULL,NULL),(4257,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','394','4252','Deterioro de valor de los productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4258,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','395','4252','Deterioro de valor de los productos terminados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4260,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','40','4004','Proveedores',0,NULL,NULL,1,NULL,NULL),(4261,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','400','4260','Proveedores',0,NULL,NULL,1,NULL,NULL),(4262,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4000','4261','Proveedores euros',0,NULL,NULL,1,NULL,NULL),(4263,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4004','4261','Proveedores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4264,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4009','4261','Proveedores facturas pendientes de recibir o formalizar',0,NULL,NULL,1,NULL,NULL),(4265,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','401','4260','Proveedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4266,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','403','4260','Proveedores empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4267,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4030','4266','Proveedores empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4268,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4031','4266','Efectos comerciales a pagar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4269,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4034','4266','Proveedores empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4272,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','404','4260','Proveedores empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4273,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','405','4260','Proveedores otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4274,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','406','4260','Envases y embalajes a devolver a proveedores',0,NULL,NULL,1,NULL,NULL),(4275,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','407','4260','Anticipos a proveedores',0,NULL,NULL,1,NULL,NULL),(4276,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','41','4004','Acreedores varios',0,NULL,NULL,1,NULL,NULL),(4277,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','410','4276','Acreedores por prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4278,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4100','4277','Acreedores por prestaciones de servicios euros',0,NULL,NULL,1,NULL,NULL),(4279,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4104','4277','Acreedores por prestaciones de servicios moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4281,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','411','4276','Acreedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4282,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','419','4276','Acreedores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4283,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','43','4004','Clientes',0,NULL,NULL,1,NULL,NULL),(4284,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','430','4283','Clientes',0,NULL,NULL,1,NULL,NULL),(4285,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4300','4284','Clientes euros',0,NULL,NULL,1,NULL,NULL),(4286,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4304','4284','Clientes moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4287,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4309','4284','Clientes facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4288,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','431','4283','Clientes efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4289,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4310','4288','Efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4290,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4311','4288','Efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4291,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4312','4288','Efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4292,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4315','4288','Efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4293,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','432','4283','Clientes operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4294,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','433','4283','Clientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4295,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4330','4294','Clientes empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4296,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4331','4294','Efectos comerciales a cobrar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4297,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4332','4294','Clientes empresas del grupo operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4298,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4334','4294','Clientes empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4299,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4336','4294','Clientes empresas del grupo dudoso cobro',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4301,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4339','4294','Clientes empresas del grupo facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4302,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','434','4283','Clientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4303,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','435','4283','Clientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4304,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','436','4283','Clientes de dudoso cobro',0,NULL,NULL,1,NULL,NULL),(4305,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','437','4283','Envases y embalajes a devolver por clientes',0,NULL,NULL,1,NULL,NULL),(4306,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','438','4283','Anticipos de clientes',0,NULL,NULL,1,NULL,NULL),(4307,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','44','4004','Deudores varios',0,NULL,NULL,1,NULL,NULL),(4308,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','440','4307','Deudores',0,NULL,NULL,1,NULL,NULL),(4309,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4400','4308','Deudores euros',0,NULL,NULL,1,NULL,NULL),(4310,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4404','4308','Deudores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4311,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4409','4308','Deudores facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4312,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','441','4307','Deudores efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4313,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4410','4312','Deudores efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4314,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4411','4312','Deudores efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4315,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4412','4312','Deudores efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4316,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4415','4312','Deudores efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4317,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','446','4307','Deudores de dusoso cobro',0,NULL,NULL,1,NULL,NULL),(4318,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','449','4307','Deudores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4319,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','46','4004','Personal',0,NULL,NULL,1,NULL,NULL),(4320,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','460','4319','Anticipos de renumeraciones',0,NULL,NULL,1,NULL,NULL),(4321,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','465','4319','Renumeraciones pendientes de pago',0,NULL,NULL,1,NULL,NULL),(4322,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','47','4004','Administraciones Públicas',0,NULL,NULL,1,NULL,NULL),(4323,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','470','4322','Hacienda Pública deudora por diversos conceptos',0,NULL,NULL,1,NULL,NULL),(4324,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4700','4323','Hacienda Pública deudora por IVA',0,NULL,NULL,1,NULL,NULL),(4325,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4708','4323','Hacienda Pública deudora por subvenciones concedidas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4327,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','471','4322','Organismos de la Seguridad Social deudores',0,NULL,NULL,1,NULL,NULL),(4328,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','472','4322','Hacienda Pública IVA soportado',0,NULL,NULL,1,NULL,NULL),(4329,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','473','4322','Hacienda Pública retenciones y pagos a cuenta',0,NULL,NULL,1,NULL,NULL),(4330,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','474','4322','Activos por impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4331,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4740','4330','Activos por diferencias temporarias deducibles',0,NULL,NULL,1,NULL,NULL),(4332,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4742','4330','Derechos por deducciones y bonificaciones pendientes de aplicar',0,NULL,NULL,1,NULL,NULL),(4333,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4745','4330','Crédito por pérdidasa compensar del ejercicio',0,NULL,NULL,1,NULL,NULL),(4334,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','475','4322','Hacienda Pública acreedora por conceptos fiscales',0,NULL,NULL,1,NULL,NULL),(4335,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4750','4334','Hacienda Pública acreedora por IVA',0,NULL,NULL,1,NULL,NULL),(4336,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4751','4334','Hacienda Pública acreedora por retenciones practicadas',0,NULL,NULL,1,NULL,NULL),(4337,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4752','4334','Hacienda Pública acreedora por impuesto sobre sociedades',0,NULL,NULL,1,NULL,NULL),(4338,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4758','4334','Hacienda Pública acreedora por subvenciones a integrar',0,NULL,NULL,1,NULL,NULL),(4339,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','476','4322','Organismos de la Seguridad Social acreedores',0,NULL,NULL,1,NULL,NULL),(4340,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','477','4322','Hacienda Pública IVA repercutido',0,NULL,NULL,1,NULL,NULL),(4341,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','479','4322','Pasivos por diferencias temporarias imponibles',0,NULL,NULL,1,NULL,NULL),(4342,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','48','4004','Ajustes por periodificación',0,NULL,NULL,1,NULL,NULL),(4343,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','480','4342','Gastos anticipados',0,NULL,NULL,1,NULL,NULL),(4344,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','485','4342','Ingresos anticipados',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4351,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','499','4345','Provisiones por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4352,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4994','4351','Provisión para contratos anerosos',0,NULL,NULL,1,NULL,NULL),(4353,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4999','4351','Provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4355,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','500','4354','Obligaciones y bonos a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4360,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','509','4354','Valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4361,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5090','4360','Obligaciones y bonos amortizados',0,NULL,NULL,1,NULL,NULL),(4362,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5095','4360','Otros valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4363,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','51','4005','Deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4368,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','511','4363','Proveedores de inmovilizado a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4370,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5114','4368','Proveedores de inmovilizado a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4376,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','513','4363','Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4378,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5134','4376','Otras deudas a corto plazo con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4379,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5135','4376','Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4380,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','514','4363','Intereses a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4381,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5143','4380','Intereses a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4382,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5144','4380','Intereses a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4383,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5145','4380','Intereses deudas a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4387,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5201','4385','Deudas a corto plazo por crédito dispuesto',0,NULL,NULL,1,NULL,NULL),(4388,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5208','4385','Deudas por efectos descontados',0,NULL,NULL,1,NULL,NULL),(4389,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5209','4385','Deudas por operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4390,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','521','4384','Deudas a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4392,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','523','4384','Proveedores de inmovilizado a corto plazo',0,NULL,NULL,1,NULL,NULL),(4393,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','526','4384','Dividendo activo a pagar',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4395,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','528','4384','Intereses a corto plazo de deudas',0,NULL,NULL,1,NULL,NULL),(4396,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','529','4384','Provisiones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4397,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5291','4396','Provisión a corto plazo para impuestos',0,NULL,NULL,1,NULL,NULL),(4398,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5292','4396','Provisión a corto plazo para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4400,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5295','4396','Provisión a corto plazo para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4401,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','53','4005','Inversiones financieras a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4402,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','530','4401','Participaciones a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4403,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5303','4402','Participaciones a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4404,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5304','4402','Participaciones a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4405,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5305','4402','Participaciones a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4410,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','532','4401','Créditos a corto plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4412,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5324','4410','Créditos a corto plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4423,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5353','4422','Dividendo a cobrar de empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4424,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5354','4422','Dividendo a cobrar de empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4425,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5355','4422','Dividendo a cobrar de otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4430,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','54','4005','Otras inversiones financieras a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4432,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','541','4430','Valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4433,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','542','4430','Créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4435,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','544','4430','Créditos a corto plazo al personal',0,NULL,NULL,1,NULL,NULL),(4436,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','545','4430','Dividendo a cobrar',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4438,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','547','4430','Intereses a corto plazo de créditos',0,NULL,NULL,1,NULL,NULL),(4439,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','548','4430','Imposiciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4441,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','55','4005','Otras cuentas no bancarias',0,NULL,NULL,1,NULL,NULL),(4442,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','550','4441','Titular de la explotación',0,NULL,NULL,1,NULL,NULL),(4443,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','551','4441','Cuenta corriente con socios y administradores',0,NULL,NULL,1,NULL,NULL),(4444,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','552','4441','Cuenta corriente otras personas y entidades vinculadas',0,NULL,NULL,1,NULL,NULL),(4445,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5523','4444','Cuenta corriente con empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4446,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5524','4444','Cuenta corriente con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4447,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5525','4444','Cuenta corriente con otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4449,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','555','4441','Partidas pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4450,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','556','4441','Desembolsos exigidos sobre participaciones en el patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4451,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5563','4450','Desembolsos exigidos sobre participaciones empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4452,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5564','4450','Desembolsos exigidos sobre participaciones empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4453,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5565','4450','Desembolsos exigidos sobre participaciones otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4454,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5566','4450','Desembolsos exigidos sobre participaciones otras empresas',0,NULL,NULL,1,NULL,NULL),(4455,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','557','4441','Dividendo activo a cuenta',0,NULL,NULL,1,NULL,NULL),(4456,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','558','4441','Socios por desembolsos exigidos',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4459,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','559','4441','Derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4460,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5590','4459','Activos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4461,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5595','4459','Pasivos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4463,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','560','4462','Finanzas recibidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4464,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','561','4462','Depósitos recibidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4465,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','565','4462','Finanzas constituidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4466,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','566','4462','Depósitos constituidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4467,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','567','4462','Intereses pagados por anticipado',0,NULL,NULL,1,NULL,NULL),(4468,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','568','4462','Intereses cobrados a corto plazo',0,NULL,NULL,1,NULL,NULL),(4469,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','57','4005','Tesorería',0,NULL,NULL,1,NULL,NULL),(4470,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','CAJA','570','4469','Caja euros',0,NULL,NULL,1,NULL,NULL),(4471,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','571','4469','Caja moneda extranjera',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4476,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','576','4469','Inversiones a corto plazo de gran liquidez',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4490,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','596','4477','Deterioro del valor de participaciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(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',0,NULL,NULL,1,NULL,NULL),(4493,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','60','4006','Compras',0,NULL,NULL,1,NULL,NULL),(4494,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','600','4493','Compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4495,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','601','4493','Compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4496,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','602','4493','Compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4497,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','606','4493','Descuentos sobre compras por pronto pago',0,NULL,NULL,1,NULL,NULL),(4498,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6060','4497','Descuentos sobre compras por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4499,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6061','4497','Descuentos sobre compras por pronto pago de materias primas',0,NULL,NULL,1,NULL,NULL),(4500,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6062','4497','Descuentos sobre compras por pronto pago de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4501,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','607','4493','Trabajos realizados por otras empresas',0,NULL,NULL,1,NULL,NULL),(4502,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','608','4493','Devoluciones de compras y operaciones similares',0,NULL,NULL,1,NULL,NULL),(4503,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6080','4502','Devoluciones de compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4504,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6081','4502','Devoluciones de compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4505,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6082','4502','Devoluciones de compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4506,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','609','4493','Rappels por compras',0,NULL,NULL,1,NULL,NULL),(4507,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6090','4506','Rappels por compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4508,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6091','4506','Rappels por compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4509,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6092','4506','Rappels por compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4510,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','61','4006','Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4511,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','610','4510','Variación de existencias de mercaderías',0,NULL,NULL,1,NULL,NULL),(4512,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','611','4510','Variación de existencias de materias primas',0,NULL,NULL,1,NULL,NULL),(4513,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','612','4510','Variación de existencias de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4514,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','62','4006','Servicios exteriores',0,NULL,NULL,1,NULL,NULL),(4515,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','620','4514','Gastos en investigación y desarrollo del ejercicio',0,NULL,NULL,1,NULL,NULL),(4516,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','621','4514','Arrendamientos y cánones',0,NULL,NULL,1,NULL,NULL),(4517,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','622','4514','Reparaciones y conservación',0,NULL,NULL,1,NULL,NULL),(4518,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','623','4514','Servicios profesionales independientes',0,NULL,NULL,1,NULL,NULL),(4519,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','624','4514','Transportes',0,NULL,NULL,1,NULL,NULL),(4520,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','625','4514','Primas de seguros',0,NULL,NULL,1,NULL,NULL),(4521,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','626','4514','Servicios bancarios y similares',0,NULL,NULL,1,NULL,NULL),(4522,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','627','4514','Publicidad, propaganda y relaciones públicas',0,NULL,NULL,1,NULL,NULL),(4523,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','628','4514','Suministros',0,NULL,NULL,1,NULL,NULL),(4524,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','629','4514','Otros servicios',0,NULL,NULL,1,NULL,NULL),(4525,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','63','4006','Tributos',0,NULL,NULL,1,NULL,NULL),(4526,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','630','4525','Impuesto sobre benecifios',0,NULL,NULL,1,NULL,NULL),(4527,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6300','4526','Impuesto corriente',0,NULL,NULL,1,NULL,NULL),(4528,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6301','4526','Impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4529,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','631','4525','Otros tributos',0,NULL,NULL,1,NULL,NULL),(4530,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','633','4525','Ajustes negativos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4531,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','634','4525','Ajustes negativos en la imposición indirecta',0,NULL,NULL,1,NULL,NULL),(4532,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6341','4531','Ajustes negativos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4533,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6342','4531','Ajustes negativos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4534,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','636','4525','Devolución de impuestos',0,NULL,NULL,1,NULL,NULL),(4535,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','638','4525','Ajustes positivos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4536,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','639','4525','Ajustes positivos en la imposición directa',0,NULL,NULL,1,NULL,NULL),(4537,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6391','4536','Ajustes positivos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4538,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6392','4536','Ajustes positivos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4539,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','64','4006','Gastos de personal',0,NULL,NULL,1,NULL,NULL),(4540,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','640','4539','Sueldos y salarios',0,NULL,NULL,1,NULL,NULL),(4541,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','641','4539','Indemnizaciones',0,NULL,NULL,1,NULL,NULL),(4542,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','642','4539','Seguridad social a cargo de la empresa',0,NULL,NULL,1,NULL,NULL),(4543,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','649','4539','Otros gastos sociales',0,NULL,NULL,1,NULL,NULL),(4544,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','65','4006','Otros gastos de gestión',0,NULL,NULL,1,NULL,NULL),(4545,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','650','4544','Pérdidas de créditos comerciales incobrables',0,NULL,NULL,1,NULL,NULL),(4546,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','651','4544','Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4547,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6510','4546','Beneficio transferido gestor',0,NULL,NULL,1,NULL,NULL),(4548,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6511','4546','Pérdida soportada participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4549,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','659','4544','Otras pérdidas en gestión corriente',0,NULL,NULL,1,NULL,NULL),(4550,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','66','4006','Gastos financieros',0,NULL,NULL,1,NULL,NULL),(4551,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','660','4550','Gastos financieros por actualización de provisiones',0,NULL,NULL,1,NULL,NULL),(4552,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','661','4550','Intereses de obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4553,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6610','4452','Intereses de obligaciones y bonos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4554,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6611','4452','Intereses de obligaciones y bonos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4555,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6612','4452','Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4556,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6613','4452','Intereses de obligaciones y bonos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4557,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6615','4452','Intereses de obligaciones y bonos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4558,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6616','4452','Intereses de obligaciones y bonos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4559,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6617','4452','Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4560,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6618','4452','Intereses de obligaciones y bonos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4561,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','662','4550','Intereses de deudas',0,NULL,NULL,1,NULL,NULL),(4562,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6620','4561','Intereses de deudas empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4563,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6621','4561','Intereses de deudas empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4564,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6622','4561','Intereses de deudas otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4565,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6623','4561','Intereses de deudas con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4566,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6624','4561','Intereses de deudas otras empresas',0,NULL,NULL,1,NULL,NULL),(4567,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','663','4550','Pérdidas por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4568,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','664','4550','Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4569,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6640','4568','Dividendos de pasivos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4570,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6641','4568','Dividendos de pasivos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4571,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6642','4568','Dividendos de pasivos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4572,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6643','4568','Dividendos de pasivos otras empresas',0,NULL,NULL,1,NULL,NULL),(4573,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','665','4550','Intereses por descuento de efectos y operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4574,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6650','4573','Intereses por descuento de efectos en entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4575,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6651','4573','Intereses por descuento de efectos en entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4576,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6652','4573','Intereses por descuento de efectos en entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4577,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6653','4573','Intereses por descuento de efectos en otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4578,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6654','4573','Intereses por operaciones de factoring con entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4579,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6655','4573','Intereses por operaciones de factoring con entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4580,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6656','4573','Intereses por operaciones de factoring con otras entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4581,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6657','4573','Intereses por operaciones de factoring con otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4582,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','666','4550','Pérdidas en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4583,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6660','4582','Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4584,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6661','4582','Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4585,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6662','4582','Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4586,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6663','4582','Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4587,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6665','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4588,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6666','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4589,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6667','4582','Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4590,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6668','4582','Pérdidas en valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4591,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','667','4550','Pérdidas de créditos no comerciales',0,NULL,NULL,1,NULL,NULL),(4592,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6670','4591','Pérdidas de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4593,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6671','4591','Pérdidas de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4594,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6672','4591','Pérdidas de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4595,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6673','4591','Pérdidas de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4596,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6675','4591','Pérdidas de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4597,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6676','4591','Pérdidas de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4598,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6677','4591','Pérdidas de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4599,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6678','4591','Pérdidas de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4600,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','668','4550','Diferencias negativas de cambio',0,NULL,NULL,1,NULL,NULL),(4601,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','669','4550','Otros gastos financieros',0,NULL,NULL,1,NULL,NULL),(4602,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','67','4006','Pérdidas procedentes de activos no corrientes y gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4603,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','670','4602','Pérdidas procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4604,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','671','4602','Pérdidas procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4605,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','672','4602','Pérdidas procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4607,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','673','4602','Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4608,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6733','4607','Pérdidas procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4609,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6734','4607','Pérdidas procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4610,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6735','4607','Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4611,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','675','4602','Pérdidas por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4612,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','678','4602','Gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4613,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','68','4006','Dotaciones para amortizaciones',0,NULL,NULL,1,NULL,NULL),(4614,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','680','4613','Amortización del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4615,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','681','4613','Amortización del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4616,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','682','4613','Amortización de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4617,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','69','4006','Pérdidas por deterioro y otras dotaciones',0,NULL,NULL,1,NULL,NULL),(4618,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','690','4617','Pérdidas por deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4619,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','691','4617','Pérdidas por deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4620,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','692','4617','Pérdidas por deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4621,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','693','4617','Pérdidas por deterioro de existencias',0,NULL,NULL,1,NULL,NULL),(4622,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6930','4621','Pérdidas por deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4623,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6931','4621','Pérdidas por deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4624,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6932','4621','Pérdidas por deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4625,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6933','4621','Pérdidas por deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4626,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','694','4617','Pérdidas por deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4627,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','695','4617','Dotación a la provisión por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4628,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6954','4627','Dotación a la provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4629,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6959','4628','Dotación a la provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4630,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','696','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4631,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6960','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4632,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6961','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4633,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6962','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4634,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6963','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4635,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6965','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4636,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6966','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4637,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6967','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4638,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6968','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4639,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','697','4617','Pérdidas por deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4640,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6970','4639','Pérdidas por deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4641,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6971','4639','Pérdidas por deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4642,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6972','4639','Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4643,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6973','4639','Pérdidas por deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4644,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','698','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4645,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6980','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4646,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6981','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4647,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6985','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4648,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6986','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4649,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6988','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',0,NULL,NULL,1,NULL,NULL),(4650,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','699','4617','Pérdidas por deterioro de crédito a corto plazo',0,NULL,NULL,1,NULL,NULL),(4651,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6990','4650','Pérdidas por deterioro de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4652,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6991','4650','Pérdidas por deterioro de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4653,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6992','4650','Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4654,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6993','4650','Pérdidas por deterioro de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4655,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','70','4007','Ventas',0,NULL,NULL,1,NULL,NULL),(4656,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','700','4655','Ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4657,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','701','4655','Ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4658,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','702','4655','Ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4659,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','703','4655','Ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4660,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','704','4655','Ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4661,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','705','4655','Prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4662,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','706','4655','Descuentos sobre ventas por pronto pago',0,NULL,NULL,1,NULL,NULL),(4663,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7060','4662','Descuentos sobre ventas por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4664,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7061','4662','Descuentos sobre ventas por pronto pago de productos terminados',0,NULL,NULL,1,NULL,NULL),(4665,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7062','4662','Descuentos sobre ventas por pronto pago de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4666,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7063','4662','Descuentos sobre ventas por pronto pago de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4667,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','708','4655','Devoluciones de ventas y operacioes similares',0,NULL,NULL,1,NULL,NULL),(4668,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7080','4667','Devoluciones de ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4669,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7081','4667','Devoluciones de ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4670,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7082','4667','Devoluciones de ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4671,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7083','4667','Devoluciones de ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4672,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7084','4667','Devoluciones de ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4673,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','71','4007','Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4674,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','710','4673','Variación de existencias de productos en curso',0,NULL,NULL,1,NULL,NULL),(4675,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','711','4673','Variación de existencias de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4676,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','712','4673','Variación de existencias de productos terminados',0,NULL,NULL,1,NULL,NULL),(4677,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','713','4673','Variación de existencias de subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4678,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','73','4007','Trabajos realizados para la empresa',0,NULL,NULL,1,NULL,NULL),(4679,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','730','4678','Trabajos realizados para el inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4680,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','731','4678','Trabajos realizados para el inmovilizado tangible',0,NULL,NULL,1,NULL,NULL),(4681,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','732','4678','Trabajos realizados en inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4682,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','733','4678','Trabajos realizados para el inmovilizado material en curso',0,NULL,NULL,1,NULL,NULL),(4683,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','74','4007','Subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4684,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','740','4683','Subvenciones, donaciones y legados a la explotación',0,NULL,NULL,1,NULL,NULL),(4685,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','746','4683','Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4686,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','747','4683','Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4687,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','75','4007','Otros ingresos de gestión',0,NULL,NULL,1,NULL,NULL),(4688,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','751','4687','Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4689,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7510','4688','Pérdida transferida gestor',0,NULL,NULL,1,NULL,NULL),(4690,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7511','4688','Beneficio atribuido participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4691,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','752','4687','Ingreso por arrendamiento',0,NULL,NULL,1,NULL,NULL),(4692,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','753','4687','Ingresos de propiedad industrial cedida en explotación',0,NULL,NULL,1,NULL,NULL),(4693,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','754','4687','Ingresos por comisiones',0,NULL,NULL,1,NULL,NULL),(4694,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','755','4687','Ingresos por servicios al personal',0,NULL,NULL,1,NULL,NULL),(4695,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','759','4687','Ingresos por servicios diversos',0,NULL,NULL,1,NULL,NULL),(4696,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76','4007','Ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4697,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','760','4696','Ingresos de participaciones en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4698,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7600','4697','Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4699,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7601','4697','Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4700,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7602','4697','Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4701,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7603','4697','Ingresos de participaciones en instrumentos de patrimonio otras empresas',0,NULL,NULL,1,NULL,NULL),(4702,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','761','4696','Ingresos de valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4703,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7610','4702','Ingresos de valores representativos de deuda empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4704,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7611','4702','Ingresos de valores representativos de deuda empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4705,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7612','4702','Ingresos de valores representativos de deuda otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4706,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7613','4702','Ingresos de valores representativos de deuda otras empresas',0,NULL,NULL,1,NULL,NULL),(4707,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','762','4696','Ingresos de créditos',0,NULL,NULL,1,NULL,NULL),(4708,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7620','4707','Ingresos de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4709,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76200','4708','Ingresos de crédito a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4710,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76201','4708','Ingresos de crédito a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4711,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76202','4708','Ingresos de crédito a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4712,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76203','4708','Ingresos de crédito a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4713,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7621','4707','Ingresos de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4714,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76210','4713','Ingresos de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4715,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76211','4713','Ingresos de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4716,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76212','4713','Ingresos de crédito a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4717,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76213','4713','Ingresos de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4718,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','763','4696','Beneficios por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4719,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','766','4696','Beneficios en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4720,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7660','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4721,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7661','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4722,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7662','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4723,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7663','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4724,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7665','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4725,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7666','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4726,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7667','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4727,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7668','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4728,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','768','4696','Diferencias positivas de cambio',0,NULL,NULL,1,NULL,NULL),(4729,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','769','4696','Otros ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4730,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','77','4007','Beneficios procedentes de activos no corrientes e ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4731,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','770','4730','Beneficios procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4732,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','771','4730','Beneficios procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4733,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','772','4730','Beneficios procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4734,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','773','4730','Beneficios procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4735,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7733','4734','Beneficios procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4736,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7734','4734','Beneficios procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4737,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7735','4734','Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4738,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','775','4730','Beneficios por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4739,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','778','4730','Ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4741,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79','4007','Excesos y aplicaciones de provisiones y pérdidas por deterioro',0,NULL,NULL,1,NULL,NULL),(4742,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','790','4741','Revisión del deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4743,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','791','4741','Revisión del deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4744,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','792','4741','Revisión del deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4745,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','793','4741','Revisión del deterioro de las existencias',0,NULL,NULL,1,NULL,NULL),(4746,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7930','4745','Revisión del deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4747,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7931','4745','Revisión del deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4748,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7932','4745','Revisión del deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4749,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7933','4745','Revisión del deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4750,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','794','4741','Revisión del deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4751,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','795','4741','Exceso de provisiones',0,NULL,NULL,1,NULL,NULL),(4752,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7951','4751','Exceso de provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4753,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7952','4751','Exceso de provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(4755,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7954','4751','Exceso de provisión para operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4756,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79544','4755','Exceso de provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4757,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79549','4755','Exceso de provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4758,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7955','4751','Exceso de provisión para actuaciones medioambienteales',0,NULL,NULL,1,NULL,NULL),(4759,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','796','4741','Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4760,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7960','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4761,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7961','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4762,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7962','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4763,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7963','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4764,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7965','4759','Revisión del deterioro de valores representativos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4765,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7966','4759','Revisión del deterioro de valores representativos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4766,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7967','4759','Revisión del deterioro de valores representativos a largo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4767,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7968','4759','Revisión del deterioro de valores representativos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4768,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','797','4741','Revisión del deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4769,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7970','4768','Revisión del deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4770,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7971','4768','Revisión del deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4771,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7972','4768','Revisión del deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4772,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7973','4768','Revisión del deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4773,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','798','4741','Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4774,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7980','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4775,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7981','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4776,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7985','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4777,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7986','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4778,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7987','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4779,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7988','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4780,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','799','4741','Revisión del deterioro de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4781,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7990','4780','Revisión del deterioro de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4782,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7991','4780','Revisión del deterioro de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4783,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7992','4780','Revisión del deterioro de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4784,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7993','4780','Revisión del deterioro de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL); /*!40000 ALTER TABLE `llx_accounting_account` ENABLE KEYS */; UNLOCK TABLES; @@ -66,26 +66,26 @@ DROP TABLE IF EXISTS `llx_accounting_bookkeeping`; CREATE TABLE `llx_accounting_bookkeeping` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `doc_date` date NOT NULL, - `doc_type` varchar(30) NOT NULL, - `doc_ref` varchar(300) NOT NULL, + `doc_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `doc_ref` varchar(300) COLLATE utf8_unicode_ci NOT NULL, `fk_doc` int(11) NOT NULL, `fk_docdet` int(11) NOT NULL, - `thirdparty_code` varchar(32) DEFAULT NULL, - `numero_compte` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `label_compte` varchar(255) DEFAULT NULL, - `label_operation` varchar(255) DEFAULT NULL, + `thirdparty_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `numero_compte` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `label_compte` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `label_operation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `debit` double(24,8) DEFAULT NULL, `credit` double(24,8) DEFAULT NULL, `montant` double(24,8) DEFAULT NULL, - `sens` varchar(1) DEFAULT NULL, + `sens` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_amount` double(24,8) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, - `lettering_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `lettering_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_lettering` datetime DEFAULT NULL, `fk_user_author` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, - `code_journal` varchar(32) DEFAULT NULL, - `journal_label` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_journal` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `journal_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `piece_num` int(11) NOT NULL, `validated` tinyint(4) NOT NULL DEFAULT '0', `date_validated` datetime DEFAULT NULL, @@ -93,14 +93,14 @@ CREATE TABLE `llx_accounting_bookkeeping` ( `fk_user_modif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `subledger_account` varchar(32) DEFAULT NULL, - `subledger_label` varchar(255) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `subledger_account` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `subledger_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_lim_reglement` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_accounting_bookkeeping_fk_doc` (`fk_doc`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -181,7 +181,7 @@ DROP TABLE IF EXISTS `llx_accounting_fiscalyear`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_accounting_fiscalyear` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(128) NOT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, `statut` tinyint(4) NOT NULL DEFAULT '0', @@ -191,7 +191,7 @@ CREATE TABLE `llx_accounting_fiscalyear` ( `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -212,14 +212,14 @@ DROP TABLE IF EXISTS `llx_accounting_journal`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_accounting_journal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `label` varchar(128) NOT NULL, + `code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `nature` smallint(6) NOT NULL DEFAULT '0', `active` smallint(6) DEFAULT '0', `entity` int(11) DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_journal_code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -241,13 +241,13 @@ DROP TABLE IF EXISTS `llx_accounting_system`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_accounting_system` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `pcg_version` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `label` varchar(128) NOT NULL, + `pcg_version` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `active` smallint(6) DEFAULT '0', `fk_country` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_system_pcg_version` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -269,13 +269,13 @@ DROP TABLE IF EXISTS `llx_actioncomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_actioncomm` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `ref_ext` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `datep` datetime DEFAULT NULL, `datep2` datetime DEFAULT NULL, `fk_action` int(11) DEFAULT NULL, - `code` varchar(32) DEFAULT NULL, - `label` varchar(255) NOT NULL, + `code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_author` int(11) DEFAULT NULL, @@ -291,25 +291,25 @@ CREATE TABLE `llx_actioncomm` ( `fulldayevent` smallint(6) NOT NULL DEFAULT '0', `punctual` smallint(6) NOT NULL DEFAULT '1', `percent` smallint(6) NOT NULL DEFAULT '0', - `location` varchar(128) DEFAULT NULL, + `location` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `durationp` double DEFAULT NULL, `durationa` double DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `fk_element` int(11) DEFAULT NULL, - `elementtype` varchar(255) DEFAULT NULL, - `email_msgid` varchar(256) DEFAULT NULL, - `email_subject` varchar(256) DEFAULT NULL, - `email_from` varchar(256) DEFAULT NULL, - `email_sender` varchar(256) DEFAULT NULL, - `email_to` varchar(256) DEFAULT NULL, - `email_tocc` varchar(256) DEFAULT NULL, - `email_tobcc` varchar(256) DEFAULT NULL, - `errors_to` varchar(256) DEFAULT NULL, - `recurid` varchar(128) DEFAULT NULL, - `recurrule` varchar(128) DEFAULT NULL, + `elementtype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_msgid` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_subject` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_from` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_sender` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_to` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_tocc` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_tobcc` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `errors_to` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, + `recurid` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `recurrule` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `recurdateend` datetime DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_actioncomm_fk_soc` (`fk_soc`), KEY `idx_actioncomm_fk_contact` (`fk_contact`), @@ -321,7 +321,7 @@ CREATE TABLE `llx_actioncomm` ( KEY `idx_actioncomm_datep2` (`datep2`), KEY `idx_actioncomm_recurid` (`recurid`), KEY `idx_actioncomm_ref_ext` (`ref_ext`) -) ENGINE=InnoDB AUTO_INCREMENT=329 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=329 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -345,10 +345,10 @@ CREATE TABLE `llx_actioncomm_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_actioncomm_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -402,15 +402,15 @@ DROP TABLE IF EXISTS `llx_actioncomm_resources`; CREATE TABLE `llx_actioncomm_resources` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_actioncomm` int(11) NOT NULL, - `element_type` varchar(50) NOT NULL, + `element_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `fk_element` int(11) NOT NULL, - `answer_status` varchar(50) DEFAULT NULL, + `answer_status` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `mandatory` smallint(6) DEFAULT NULL, `transparency` smallint(6) DEFAULT '1', 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=216 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -433,50 +433,50 @@ DROP TABLE IF EXISTS `llx_adherent`; CREATE TABLE `llx_adherent` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(128) DEFAULT NULL, - `civility` varchar(6) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `login` varchar(50) DEFAULT NULL, - `pass` varchar(50) DEFAULT NULL, - `pass_crypted` varchar(128) DEFAULT NULL, + `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `login` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass_crypted` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_adherent_type` int(11) NOT NULL, - `morphy` varchar(3) NOT NULL, - `societe` varchar(128) DEFAULT NULL, + `morphy` varchar(3) COLLATE utf8_unicode_ci NOT NULL, + `societe` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `address` text, - `zip` varchar(10) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `address` text COLLATE utf8_unicode_ci, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `state_id` int(11) DEFAULT NULL, `country` int(11) DEFAULT NULL, - `email` varchar(255) DEFAULT NULL, - `skype` varchar(255) DEFAULT NULL, - `phone` varchar(30) DEFAULT NULL, - `phone_perso` varchar(30) DEFAULT NULL, - `phone_mobile` varchar(30) DEFAULT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone_perso` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone_mobile` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `birth` date DEFAULT NULL, - `photo` varchar(255) DEFAULT NULL, + `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT '0', `public` smallint(6) NOT NULL DEFAULT '0', `datefin` datetime DEFAULT NULL, - `note_private` text, - `note_public` text, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, `datevalid` datetime DEFAULT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `canvas` varchar(32) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `model_pdf` varchar(255) DEFAULT NULL, + `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_adherent_login` (`login`,`entity`), UNIQUE KEY `uk_adherent_fk_soc` (`fk_soc`), KEY `idx_adherent_fk_adherent_type` (`fk_adherent_type`), CONSTRAINT `adherent_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_adherent_adherent_type` FOREIGN KEY (`fk_adherent_type`) REFERENCES `llx_adherent_type` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -500,14 +500,14 @@ CREATE TABLE `llx_adherent_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `zzz` varchar(125) DEFAULT NULL, - `aaa` varchar(255) DEFAULT NULL, - `sssss` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `zzz` varchar(125) COLLATE utf8_unicode_ci DEFAULT NULL, + `aaa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `sssss` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_options` (`fk_object`), KEY `idx_adherent_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -532,14 +532,14 @@ CREATE TABLE `llx_adherent_type` ( `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `statut` smallint(6) NOT NULL DEFAULT '0', - `libelle` varchar(50) NOT NULL, - `subscription` varchar(3) NOT NULL DEFAULT '1', - `vote` varchar(3) NOT NULL DEFAULT 'yes', - `note` text, - `mail_valid` text, + `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `subscription` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1', + `vote` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', + `note` text COLLATE utf8_unicode_ci, + `mail_valid` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_adherent_type_libelle` (`libelle`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -563,10 +563,10 @@ CREATE TABLE `llx_adherent_type_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_type_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -587,17 +587,17 @@ DROP TABLE IF EXISTS `llx_advtargetemailing`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_advtargetemailing` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, + `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_mailing` int(11) NOT NULL, - `filtervalue` text, + `filtervalue` text COLLATE utf8_unicode_ci, `fk_user_author` int(11) NOT NULL, `datec` datetime NOT NULL, `fk_user_mod` int(11) NOT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_advtargetemailing_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -623,27 +623,27 @@ CREATE TABLE `llx_bank` ( `datev` date DEFAULT NULL, `dateo` date DEFAULT NULL, `amount` double(24,8) NOT NULL DEFAULT '0.00000000', - `label` varchar(255) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_rappro` int(11) DEFAULT NULL, - `fk_type` varchar(6) DEFAULT NULL, - `num_releve` varchar(50) DEFAULT NULL, - `num_chq` varchar(50) DEFAULT NULL, + `fk_type` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `num_releve` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `num_chq` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `rappro` tinyint(4) DEFAULT '0', - `note` text, + `note` text COLLATE utf8_unicode_ci, `fk_bordereau` int(11) DEFAULT '0', - `banque` varchar(255) DEFAULT NULL, - `emetteur` varchar(255) DEFAULT NULL, - `author` varchar(40) DEFAULT NULL, - `numero_compte` varchar(32) DEFAULT NULL, + `banque` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `emetteur` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `author` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `numero_compte` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_bank_datev` (`datev`), KEY `idx_bank_dateo` (`dateo`), KEY `idx_bank_fk_account` (`fk_account`), KEY `idx_bank_rappro` (`rappro`), KEY `idx_bank_num_releve` (`num_releve`) -) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -652,7 +652,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','2016-07-30 15:16:10','2016-07-08','2016-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2016-07-30 15:16:10','2016-07-09','2016-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2016-07-30 15:16:10','2016-07-10','2016-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2011-07-18 20:50:24','2016-07-30 15:16:10','2016-07-08','2016-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2016-07-30 15:16:10','2016-07-08','2016-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2016-07-30 15:21:31','2015-08-01','2015-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2016-07-30 15:21:31','2015-08-05','2015-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2016-07-30 15:21:31','2015-08-06','2015-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2016-07-30 15:21:31','2015-08-08','2015-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2016-07-30 15:21:31','2015-08-08','2015-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2016-07-30 15:21:31','2015-12-09','2015-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2016-07-30 15:21:31','2015-12-09','2015-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2016-07-30 15:21:31','2015-12-12','2015-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2016-07-30 15:16:10','2016-03-06','2016-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2016-07-30 15:16:10','2016-03-20','2016-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2014-03-02 19:57:58','2016-07-30 15:16:10','2016-07-09','2016-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2014-03-02 20:01:39','2016-07-30 15:16:10','2016-03-19','2016-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2014-03-02 20:02:06','2016-07-30 15:16:10','2016-03-21','2016-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2014-03-03 19:22:32','2016-07-30 15:21:31','2015-10-03','2015-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2014-03-03 19:23:16','2016-07-30 15:16:10','2016-03-10','2016-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,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,NULL),(31,'2016-07-30 22:42:14','2016-07-30 14:42:14','2016-07-30','2016-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2017-02-01 15:02:44','2017-02-01','2017-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2017-02-06 04:12:05','2016-03-22','2016-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2017-02-06 04:10:50','2016-03-25','2016-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(35,'2017-02-12 23:18:33','2017-02-12 19:18:33','2017-02-12','2017-02-12',50.00000000,'Patient payment',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'aaa',NULL,NULL),(36,'2017-02-16 02:22:09','2017-02-15 22:22:09','2017-02-16','2017-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21','2017-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2017-09-06 16:08:36','2017-09-06','2017-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''); +INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2016-07-30 15:16:10','2016-07-08','2016-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2016-07-30 15:16:10','2016-07-09','2016-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2016-07-30 15:16:10','2016-07-10','2016-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2011-07-18 20:50:24','2016-07-30 15:16:10','2016-07-08','2016-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2016-07-30 15:16:10','2016-07-08','2016-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2016-07-30 15:21:31','2015-08-01','2015-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2016-07-30 15:21:31','2015-08-05','2015-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2016-07-30 15:21:31','2015-08-06','2015-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2016-07-30 15:21:31','2015-08-08','2015-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2016-07-30 15:21:31','2015-08-08','2015-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2016-07-30 15:21:31','2015-12-09','2015-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2016-07-30 15:21:31','2015-12-09','2015-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2016-07-30 15:21:31','2015-12-09','2015-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2016-07-30 15:21:31','2015-12-12','2015-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2016-07-30 15:16:10','2016-03-06','2016-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2016-07-30 15:16:10','2016-03-20','2016-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2014-03-02 19:57:58','2016-07-30 15:16:10','2016-07-09','2016-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2014-03-02 20:01:39','2016-07-30 15:16:10','2016-03-19','2016-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2014-03-02 20:02:06','2016-07-30 15:16:10','2016-03-21','2016-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2014-03-03 19:22:32','2016-07-30 15:21:31','2015-10-03','2015-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2014-03-03 19:23:16','2016-07-30 15:16:10','2016-03-10','2016-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,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,NULL),(31,'2016-07-30 22:42:14','2016-07-30 14:42:14','2016-07-30','2016-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2017-02-01 15:02:44','2017-02-01','2017-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2017-02-06 04:12:05','2016-03-22','2016-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2017-02-06 04:10:50','2016-03-25','2016-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(35,'2017-02-12 23:18:33','2017-02-12 19:18:33','2017-02-12','2017-02-12',50.00000000,'Patient payment',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'aaa',NULL,NULL),(36,'2017-02-16 02:22:09','2017-02-15 22:22:09','2017-02-16','2017-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21','2017-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2017-09-06 16:08:36','2017-09-06','2017-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(39,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16','2018-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,''); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -667,45 +667,45 @@ CREATE TABLE `llx_bank_account` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `ref` varchar(12) NOT NULL, - `label` varchar(30) NOT NULL, + `ref` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `bank` varchar(60) DEFAULT NULL, - `code_banque` varchar(128) DEFAULT NULL, - `code_guichet` varchar(6) DEFAULT NULL, - `number` varchar(255) DEFAULT NULL, - `cle_rib` varchar(5) DEFAULT NULL, - `bic` varchar(11) DEFAULT NULL, - `iban_prefix` varchar(34) DEFAULT NULL, - `country_iban` varchar(2) DEFAULT NULL, - `cle_iban` varchar(2) DEFAULT NULL, - `domiciliation` varchar(255) DEFAULT NULL, + `bank` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `bic` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL, + `iban_prefix` varchar(34) COLLATE utf8_unicode_ci DEFAULT NULL, + `country_iban` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_iban` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `domiciliation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `state_id` int(11) DEFAULT NULL, `fk_pays` int(11) NOT NULL, - `proprio` varchar(60) DEFAULT NULL, - `owner_address` text, + `proprio` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `owner_address` text COLLATE utf8_unicode_ci, `courant` smallint(6) NOT NULL DEFAULT '0', `clos` smallint(6) NOT NULL DEFAULT '0', `rappro` smallint(6) DEFAULT '1', - `url` varchar(128) DEFAULT NULL, - `account_number` varchar(32) DEFAULT NULL, - `accountancy_journal` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, + `url` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `account_number` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_journal` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `currency_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `min_allowed` int(11) DEFAULT '0', `min_desired` int(11) DEFAULT '0', - `comment` text, + `comment` text COLLATE utf8_unicode_ci, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_accountancy_journal` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_account_label` (`label`,`entity`), KEY `idx_fk_accountancy_journal` (`fk_accountancy_journal`), CONSTRAINT `fk_bank_account_accountancy_journal` FOREIGN KEY (`fk_accountancy_journal`) REFERENCES `llx_accounting_journal` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -729,10 +729,10 @@ CREATE TABLE `llx_bank_account_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_bank_account_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -753,10 +753,10 @@ DROP TABLE IF EXISTS `llx_bank_categ`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_bank_categ` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(255) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -780,7 +780,7 @@ CREATE TABLE `llx_bank_class` ( `lineid` int(11) NOT NULL, `fk_categ` int(11) NOT NULL, UNIQUE KEY `uk_bank_class_lineid` (`lineid`,`fk_categ`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -803,12 +803,12 @@ CREATE TABLE `llx_bank_url` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_bank` int(11) DEFAULT NULL, `url_id` int(11) DEFAULT NULL, - `url` varchar(255) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `type` varchar(24) NOT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `type` varchar(24) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_url` (`fk_bank`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -817,7 +817,7 @@ 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'),(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'),(55,32,2,'/dolibarr_5.0/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(56,32,13,'/dolibarr_5.0/htdocs/fourn/card.php?socid=','Company Corp 2','company'),(57,33,34,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(58,33,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(59,34,35,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(60,34,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(61,35,2,'/dolibarr_5.0/htdocs/dolimed_5.0/cabinetmed/consultations.php?action=edit&socid=26&id=','Consultation','consultation'),(62,35,26,'','aaa','company'),(63,36,2,'/dolibarr_5.0/htdocs/expensereport/payment/card.php?rowid=','(paiement)','payment_expensereport'),(64,36,0,'/dolibarr_5.0/htdocs/user/card.php?id=','','user'),(65,37,36,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(66,37,1,'/dolibarr_5.0/htdocs/compta/prelevement/card.php?id=','T170201','withdraw'),(67,38,1,'/dolibarr_6.0/htdocs/don/payment/card.php?rowid=','(paiement)','payment_donation'); +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'),(55,32,2,'/dolibarr_5.0/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(56,32,13,'/dolibarr_5.0/htdocs/fourn/card.php?socid=','Company Corp 2','company'),(57,33,34,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(58,33,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(59,34,35,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(60,34,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(61,35,2,'/dolibarr_5.0/htdocs/dolimed_5.0/cabinetmed/consultations.php?action=edit&socid=26&id=','Consultation','consultation'),(62,35,26,'','aaa','company'),(63,36,2,'/dolibarr_5.0/htdocs/expensereport/payment/card.php?rowid=','(paiement)','payment_expensereport'),(64,36,12,'/dolibarr_5.0/htdocs/user/card.php?id=','','user'),(65,37,36,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(66,37,1,'/dolibarr_5.0/htdocs/compta/prelevement/card.php?id=','T170201','withdraw'),(67,38,1,'/dolibarr_6.0/htdocs/don/payment/card.php?rowid=','(paiement)','payment_donation'),(68,39,38,'/dolibarr_7.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(69,39,1,'/dolibarr_7.0/htdocs/comm/card.php?socid=','Indian SAS','company'); /*!40000 ALTER TABLE `llx_bank_url` ENABLE KEYS */; UNLOCK TABLES; @@ -852,7 +852,7 @@ CREATE TABLE `llx_blockedlog` ( KEY `fk_user` (`fk_user`), KEY `entity_action` (`entity`,`action`), KEY `entity_action_certified` (`entity`,`action`,`certified`) -) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -861,7 +861,7 @@ CREATE TABLE `llx_blockedlog` ( LOCK TABLES `llx_blockedlog` WRITE; /*!40000 ALTER TABLE `llx_blockedlog` DISABLE KEYS */; -INSERT INTO `llx_blockedlog` VALUES (19,'2018-01-19 11:27:15','MODULE_SET',0.00000000,'e1b6bc67160763b48d4f42122938e750727d99faeaf0e7c4abd7414ee0b0498e','da3f2150d6a3dd544fdf597d6b0fd420e31ec33a15d7dcb0feefd8146781e4ae','module',1,'systemevent','2018-01-19 11:27:15','O:8:\"stdClass\":1:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}}',12,1,0,'2018-01-19 11:27:15','Alice Adminson'); +INSERT INTO `llx_blockedlog` VALUES (20,'2018-03-16 09:57:22','MODULE_RESET',0.00000000,'d6dd5fe6c2eec2de6368f3b6da30188566f0a1a7be4b1589ccd8352d2c827ad5','fbc11d0396d9b76ea48f892bd5f0fe652e5bdf7d44873acb4bf1e1b70352bd30','module',1,'systemevent','2018-03-16 13:57:22','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194242;}',12,1,0,'2018-03-16 13:57:22','Alice Adminson'),(21,'2018-03-16 09:57:24','MODULE_SET',0.00000000,'d6b66df837d8d33bd8b9744e2afa46ab8c65ae8ca462246c406de19f8254e146','0a3aae975056417705f4eb7b4a4926384075cc2b6c899603715643c8f1d6ff9b','module',1,'systemevent','2018-03-16 13:57:24','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194244;}',12,1,0,'2018-03-16 13:57:24','Alice Adminson'),(22,'2018-03-16 09:59:31','PAYMENT_CUSTOMER_CREATE',10.00000000,'9beb9e3ba04582d441b49f176f995900c16572c789bcf48a1c9f285a74be76c8','86813eb2563252c0e270baaf1fffade82475fe51af5f88d14613005fd0e07783','payment',38,'PAY1803-0004','2018-03-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:3:\"ref\";s:12:\"PAY1803-0004\";s:4:\"date\";i:1521187200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"10\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:10:\"Indian SAS\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1453147200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"20.00000000\";s:9:\"total_tva\";s:10:\"1.80000000\";s:9:\"total_ttc\";s:11:\"23.60000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1601-0024\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:10;}',12,1,0,'2018-03-16 13:59:31','Alice Adminson'); /*!40000 ALTER TABLE `llx_blockedlog` ENABLE KEYS */; UNLOCK TABLES; @@ -902,16 +902,16 @@ CREATE TABLE `llx_bookmark` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL, `dateb` datetime DEFAULT NULL, - `url` varchar(255) NOT NULL, - `target` varchar(16) DEFAULT NULL, - `title` varchar(64) DEFAULT NULL, - `favicon` varchar(24) DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `target` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `title` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `favicon` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) DEFAULT '0', `entity` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bookmark_url` (`fk_user`,`url`), UNIQUE KEY `uk_bookmark_title` (`fk_user`,`title`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -935,19 +935,19 @@ CREATE TABLE `llx_bordereau_cheque` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime NOT NULL, `date_bordereau` date DEFAULT NULL, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `amount` double(24,8) NOT NULL, `nbcheque` smallint(6) NOT NULL, `fk_bank_account` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `statut` smallint(6) NOT NULL DEFAULT '0', - `ref_ext` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bordereau_cheque` (`ref`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -972,16 +972,16 @@ CREATE TABLE `llx_boxes` ( `entity` int(11) NOT NULL DEFAULT '1', `box_id` int(11) NOT NULL, `position` smallint(6) NOT NULL, - `box_order` varchar(3) NOT NULL, + `box_order` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `fk_user` int(11) NOT NULL DEFAULT '0', `maxline` int(11) DEFAULT NULL, - `params` varchar(255) DEFAULT NULL, + `params` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes` (`entity`,`box_id`,`position`,`fk_user`), 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=1152 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=1183 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -990,7 +990,7 @@ CREATE TABLE `llx_boxes` ( LOCK TABLES `llx_boxes` WRITE; /*!40000 ALTER TABLE `llx_boxes` DISABLE KEYS */; -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,'A01',0,NULL,NULL),(315,1,348,0,'B18',0,NULL,NULL),(316,1,349,0,'A19',0,NULL,NULL),(317,1,350,0,'B20',0,NULL,NULL),(344,1,374,0,'A21',0,NULL,NULL),(347,1,377,0,'B22',0,NULL,NULL),(348,1,378,0,'A23',0,NULL,NULL),(358,1,388,0,'A25',0,NULL,NULL),(359,1,389,0,'B26',0,NULL,NULL),(360,1,390,0,'A27',0,NULL,NULL),(362,1,392,0,'A29',0,NULL,NULL),(363,1,393,0,'B30',0,NULL,NULL),(366,1,396,0,'A17',0,NULL,NULL),(387,1,403,0,'B16',0,NULL,NULL),(392,1,409,0,'A15',0,NULL,NULL),(393,1,410,0,'B02',0,NULL,NULL),(394,1,411,0,'A03',0,NULL,NULL),(395,1,412,0,'B04',0,NULL,NULL),(396,1,413,0,'A05',0,NULL,NULL),(397,1,414,0,'B06',0,NULL,NULL),(398,1,415,0,'A07',0,NULL,NULL),(399,1,416,0,'B08',0,NULL,NULL),(400,1,417,0,'A09',0,NULL,NULL),(401,1,418,0,'B10',0,NULL,NULL),(501,1,419,0,'A11',0,NULL,NULL),(1019,1,392,0,'A01',2,NULL,NULL),(1021,1,412,0,'A03',2,NULL,NULL),(1022,1,347,0,'A04',2,NULL,NULL),(1023,1,393,0,'A05',2,NULL,NULL),(1025,1,389,0,'A07',2,NULL,NULL),(1026,1,416,0,'A08',2,NULL,NULL),(1027,1,396,0,'B01',2,NULL,NULL),(1028,1,377,0,'B02',2,NULL,NULL),(1031,1,419,0,'B05',2,NULL,NULL),(1036,1,424,0,'0',0,NULL,NULL),(1037,1,425,0,'0',0,NULL,NULL),(1038,1,426,0,'0',0,NULL,NULL),(1039,1,427,0,'0',0,NULL,NULL),(1142,1,412,0,'A01',12,NULL,NULL),(1143,1,392,0,'A02',12,NULL,NULL),(1144,1,377,0,'A03',12,NULL,NULL),(1145,1,347,0,'A04',12,NULL,NULL),(1146,1,427,0,'B01',12,NULL,NULL),(1147,1,414,0,'B02',12,NULL,NULL),(1148,1,413,0,'B03',12,NULL,NULL),(1149,1,426,0,'B04',12,NULL,NULL),(1150,1,430,0,'0',0,NULL,NULL),(1151,1,431,0,'0',0,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,'A07',0,NULL,NULL),(315,1,348,0,'A27',0,NULL,NULL),(316,1,349,0,'A15',0,NULL,NULL),(317,1,350,0,'B28',0,NULL,NULL),(344,1,374,0,'B16',0,NULL,NULL),(347,1,377,0,'A29',0,NULL,NULL),(348,1,378,0,'A17',0,NULL,NULL),(358,1,388,0,'B18',0,NULL,NULL),(359,1,389,0,'B30',0,NULL,NULL),(360,1,390,0,'A19',0,NULL,NULL),(362,1,392,0,'B20',0,NULL,NULL),(363,1,393,0,'A31',0,NULL,NULL),(366,1,396,0,'B14',0,NULL,NULL),(387,1,403,0,'B26',0,NULL,NULL),(392,1,409,0,'A13',0,NULL,NULL),(393,1,410,0,'A21',0,NULL,NULL),(394,1,411,0,'B08',0,NULL,NULL),(395,1,412,0,'B22',0,NULL,NULL),(396,1,413,0,'A09',0,NULL,NULL),(397,1,414,0,'A23',0,NULL,NULL),(398,1,415,0,'B10',0,NULL,NULL),(399,1,416,0,'B24',0,NULL,NULL),(400,1,417,0,'A11',0,NULL,NULL),(401,1,418,0,'A25',0,NULL,NULL),(501,1,419,0,'B12',0,NULL,NULL),(1019,1,392,0,'A01',2,NULL,NULL),(1021,1,412,0,'A03',2,NULL,NULL),(1022,1,347,0,'A04',2,NULL,NULL),(1023,1,393,0,'A05',2,NULL,NULL),(1025,1,389,0,'A07',2,NULL,NULL),(1026,1,416,0,'A08',2,NULL,NULL),(1027,1,396,0,'B01',2,NULL,NULL),(1028,1,377,0,'B02',2,NULL,NULL),(1031,1,419,0,'B05',2,NULL,NULL),(1036,1,424,0,'B06',0,NULL,NULL),(1037,1,425,0,'A05',0,NULL,NULL),(1038,1,426,0,'B04',0,NULL,NULL),(1039,1,427,0,'A03',0,NULL,NULL),(1150,1,430,0,'B02',0,NULL,NULL),(1151,1,431,0,'A01',0,NULL,NULL),(1152,1,429,0,'A01',1,NULL,NULL),(1153,1,429,0,'B01',2,NULL,NULL),(1154,1,429,0,'A01',11,NULL,NULL),(1156,1,429,0,'B01',0,NULL,NULL),(1174,1,412,0,'A01',12,NULL,NULL),(1175,1,392,0,'A02',12,NULL,NULL),(1176,1,377,0,'A03',12,NULL,NULL),(1177,1,347,0,'A04',12,NULL,NULL),(1178,1,429,0,'B01',12,NULL,NULL),(1179,1,427,0,'B02',12,NULL,NULL),(1180,1,414,0,'B03',12,NULL,NULL),(1181,1,413,0,'B04',12,NULL,NULL),(1182,1,426,0,'B05',12,NULL,NULL); /*!40000 ALTER TABLE `llx_boxes` ENABLE KEYS */; UNLOCK TABLES; @@ -1003,13 +1003,13 @@ DROP TABLE IF EXISTS `llx_boxes_def`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_boxes_def` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `file` varchar(200) NOT NULL, + `file` varchar(200) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `note` varchar(130) DEFAULT NULL, + `note` varchar(130) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) -) ENGINE=InnoDB AUTO_INCREMENT=432 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=432 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1032,9 +1032,9 @@ DROP TABLE IF EXISTS `llx_budget`; CREATE TABLE `llx_budget` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `label` varchar(255) NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` int(11) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, `datec` datetime DEFAULT NULL, @@ -1043,7 +1043,7 @@ CREATE TABLE `llx_budget` ( `fk_user_modif` int(11) DEFAULT NULL, `import_key` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1065,7 +1065,7 @@ DROP TABLE IF EXISTS `llx_budget_lines`; CREATE TABLE `llx_budget_lines` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_budget` int(11) NOT NULL, - `fk_project_ids` varchar(255) NOT NULL, + `fk_project_ids` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `amount` double(24,8) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -1075,7 +1075,7 @@ CREATE TABLE `llx_budget_lines` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_budget_lines` (`fk_budget`,`fk_project_ids`), CONSTRAINT `fk_budget_lines_budget` FOREIGN KEY (`fk_budget`) REFERENCES `llx_budget` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1087,6 +1087,34 @@ LOCK TABLES `llx_budget_lines` WRITE; /*!40000 ALTER TABLE `llx_budget_lines` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_c_accountancy_category` +-- + +DROP TABLE IF EXISTS `llx_c_accountancy_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_accountancy_category` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `rangecode` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `position` int(11) DEFAULT '0', + `fk_country` int(11) DEFAULT NULL, + `active` int(11) DEFAULT '1', + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_accountancy_category` +-- + +LOCK TABLES `llx_c_accountancy_category` WRITE; +/*!40000 ALTER TABLE `llx_c_accountancy_category` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_c_accountancy_category` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_c_accounting_category` -- @@ -1096,18 +1124,18 @@ DROP TABLE IF EXISTS `llx_c_accounting_category`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_accounting_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(16) NOT NULL, - `label` varchar(255) NOT NULL, - `range_account` varchar(255) NOT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `range_account` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sens` tinyint(4) NOT NULL DEFAULT '0', `category_type` tinyint(4) NOT NULL DEFAULT '0', - `formula` varchar(255) NOT NULL, + `formula` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `position` int(11) DEFAULT '0', `fk_country` int(11) DEFAULT NULL, `active` int(11) DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_accounting_category` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1129,15 +1157,15 @@ DROP TABLE IF EXISTS `llx_c_action_trigger`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_action_trigger` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) NOT NULL, - `label` varchar(128) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `elementtype` varchar(24) NOT NULL, + `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `elementtype` varchar(24) COLLATE utf8_unicode_ci NOT NULL, `rang` int(11) DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_action_trigger_code` (`code`), KEY `idx_action_trigger_rang` (`rang`) -) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=225 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1146,7 +1174,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 (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',140),(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),(174,'PROJECT_MODIFY','Project modified','Executed when a project is modified','project',141),(175,'PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',142),(176,'ORDER_SUPPLIER_CREATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(177,'ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',12),(178,'ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',12),(179,'ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14),(180,'PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30),(181,'PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30),(182,'PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30),(183,'EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expense_report',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expense_report',203),(187,'EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expense_report',204),(192,'HOLIDAY_CREATE','Leave request created','Executed when a leave request is created','holiday',221),(193,'HOLIDAY_VALIDATE','Leave request validated','Executed when a leave request is validated','holiday',222),(194,'HOLIDAY_APPROVE','Leave request approved','Executed when a leave request is approved','holiday',223),(210,'MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23),(211,'CONTRACT_SENTBYMAIL','Contract sent by mail','Executed when a contract is sent by mail','contrat',18),(212,'PROPOSAL_SUPPLIER_VALIDATE','Price request validated','Executed when a commercial proposal is validated','proposal_supplier',10),(213,'PROPOSAL_SUPPLIER_SENTBYMAIL','Price request sent by mail','Executed when a commercial proposal is sent by mail','proposal_supplier',10),(214,'PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10),(215,'PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10); +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),(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',140),(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),(174,'PROJECT_MODIFY','Project modified','Executed when a project is modified','project',141),(175,'PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',142),(176,'ORDER_SUPPLIER_CREATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(177,'ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',12),(178,'ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',12),(179,'ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14),(180,'PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30),(181,'PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30),(182,'PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30),(183,'EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expense_report',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expense_report',203),(187,'EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expense_report',204),(192,'HOLIDAY_CREATE','Leave request created','Executed when a leave request is created','holiday',221),(193,'HOLIDAY_VALIDATE','Leave request validated','Executed when a leave request is validated','holiday',222),(194,'HOLIDAY_APPROVE','Leave request approved','Executed when a leave request is approved','holiday',223),(210,'MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23),(211,'CONTRACT_SENTBYMAIL','Contract sent by mail','Executed when a contract is sent by mail','contrat',18),(212,'PROPOSAL_SUPPLIER_VALIDATE','Price request validated','Executed when a commercial proposal is validated','proposal_supplier',10),(213,'PROPOSAL_SUPPLIER_SENTBYMAIL','Price request sent by mail','Executed when a commercial proposal is sent by mail','proposal_supplier',10),(214,'PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10),(215,'PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10),(216,'MEMBER_SUBSCRIPTION_CREATE','Member subscribtion recorded','Executed when a member subscribtion is deleted','member',24),(217,'MEMBER_SUBSCRIPTION_MODIFY','Member subscribtion modified','Executed when a member subscribtion is modified','member',24),(218,'MEMBER_SUBSCRIPTION_DELETE','Member subscribtion deleted','Executed when a member subscribtion is deleted','member',24); /*!40000 ALTER TABLE `llx_c_action_trigger` ENABLE KEYS */; UNLOCK TABLES; @@ -1159,18 +1187,18 @@ DROP TABLE IF EXISTS `llx_c_actioncomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_actioncomm` ( `id` int(11) NOT NULL, - `code` varchar(12) NOT NULL, - `type` varchar(50) NOT NULL DEFAULT 'system', - `libelle` varchar(48) NOT NULL, - `module` varchar(16) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'system', + `libelle` varchar(48) COLLATE utf8_unicode_ci NOT NULL, + `module` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `todo` tinyint(4) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', - `color` varchar(9) DEFAULT NULL, - `picto` varchar(48) DEFAULT NULL, + `color` varchar(9) COLLATE utf8_unicode_ci DEFAULT NULL, + `picto` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_actioncomm` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1179,7 +1207,7 @@ CREATE TABLE `llx_c_actioncomm` ( LOCK TABLES `llx_c_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_c_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_c_actioncomm` VALUES (1,'AC_TEL','system','Phone call',NULL,1,NULL,2,NULL,NULL),(2,'AC_FAX','system','Send Fax',NULL,1,NULL,3,NULL,NULL),(4,'AC_EMAIL','system','Send Email',NULL,1,NULL,4,NULL,NULL),(5,'AC_RDV','system','Rendez-vous',NULL,1,NULL,1,NULL,NULL),(11,'AC_INT','system','Intervention on site',NULL,1,NULL,4,NULL,NULL),(40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL,1,NULL,20,NULL,NULL),(50,'AC_OTH','system','Other (manually inserted events)',NULL,1,NULL,5,NULL,NULL),(100700,'AC_CABMED','module','Send document by email','cabinetmed',0,NULL,100,NULL,NULL); +INSERT INTO `llx_c_actioncomm` VALUES (1,'AC_TEL','system','Phone call',NULL,1,NULL,2,NULL,NULL),(2,'AC_FAX','system','Send Fax',NULL,1,NULL,3,NULL,NULL),(3,'AC_PROP','systemauto','Send commercial proposal by email','propal',1,NULL,10,NULL,NULL),(4,'AC_EMAIL','system','Send Email',NULL,1,NULL,4,NULL,NULL),(5,'AC_RDV','system','Rendez-vous',NULL,1,NULL,1,NULL,NULL),(8,'AC_COM','systemauto','Send customer order by email','order',1,NULL,8,NULL,NULL),(9,'AC_FAC','systemauto','Send customer invoice by email','invoice',1,NULL,6,NULL,NULL),(10,'AC_SHIP','systemauto','Send shipping by email','shipping',1,NULL,11,NULL,NULL),(11,'AC_INT','system','Intervention on site',NULL,1,NULL,4,NULL,NULL),(30,'AC_SUP_ORD','systemauto','Send supplier order by email','order_supplier',1,NULL,9,NULL,NULL),(31,'AC_SUP_INV','systemauto','Send supplier invoice by email','invoice_supplier',1,NULL,7,NULL,NULL),(40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL,1,NULL,20,NULL,NULL),(50,'AC_OTH','system','Other (manually inserted events)',NULL,1,NULL,5,NULL,NULL),(100700,'AC_CABMED','module','Send document by email','cabinetmed',0,NULL,100,NULL,NULL); /*!40000 ALTER TABLE `llx_c_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -1192,12 +1220,12 @@ DROP TABLE IF EXISTS `llx_c_availability`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_availability` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(30) NOT NULL, - `label` varchar(60) NOT NULL, + `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(60) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_availability` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1219,14 +1247,14 @@ DROP TABLE IF EXISTS `llx_c_barcode_type`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_barcode_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(16) NOT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `libelle` varchar(50) NOT NULL, - `coder` varchar(16) NOT NULL, - `example` varchar(16) NOT NULL, + `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `coder` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `example` varchar(16) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_barcode_type` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1248,15 +1276,15 @@ DROP TABLE IF EXISTS `llx_c_chargesociales`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_chargesociales` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `libelle` varchar(80) DEFAULT NULL, + `libelle` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, `deductible` smallint(6) NOT NULL DEFAULT '0', `active` tinyint(4) NOT NULL DEFAULT '1', - `code` varchar(12) NOT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `fk_pays` int(11) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, - `accountancy_code` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4110 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4110 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1278,13 +1306,13 @@ DROP TABLE IF EXISTS `llx_c_civility`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_civility` ( `rowid` int(11) NOT NULL, - `code` varchar(6) NOT NULL, - `label` varchar(50) DEFAULT NULL, + `code` varchar(6) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_civility` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1306,16 +1334,16 @@ DROP TABLE IF EXISTS `llx_c_country`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_country` ( `rowid` int(11) NOT NULL, - `code` varchar(2) NOT NULL, - `code_iso` varchar(3) DEFAULT NULL, - `label` varchar(50) NOT NULL, + `code` varchar(2) COLLATE utf8_unicode_ci NOT NULL, + `code_iso` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `favorite` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `idx_c_country_code` (`code`), UNIQUE KEY `idx_c_country_label` (`label`), UNIQUE KEY `idx_c_country_code_iso` (`code_iso`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1336,13 +1364,13 @@ DROP TABLE IF EXISTS `llx_c_currencies`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_currencies` ( - `code_iso` varchar(3) NOT NULL, - `label` varchar(64) NOT NULL, - `unicode` varchar(32) DEFAULT NULL, + `code_iso` varchar(3) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `unicode` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`code_iso`), UNIQUE KEY `uk_c_currencies_code_iso` (`code_iso`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1364,19 +1392,19 @@ DROP TABLE IF EXISTS `llx_c_departements`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_departements` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code_departement` varchar(6) NOT NULL, + `code_departement` varchar(6) COLLATE utf8_unicode_ci NOT NULL, `fk_region` int(11) DEFAULT NULL, - `cheflieu` varchar(50) DEFAULT NULL, + `cheflieu` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `tncc` int(11) DEFAULT NULL, - `ncc` varchar(50) DEFAULT NULL, - `nom` varchar(50) DEFAULT NULL, + `ncc` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', 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`), CONSTRAINT `fk_departements_fk_region` FOREIGN KEY (`fk_region`) REFERENCES `llx_c_regions` (`code_region`) -) ENGINE=InnoDB AUTO_INCREMENT=2066 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2066 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1398,15 +1426,15 @@ DROP TABLE IF EXISTS `llx_c_ecotaxe`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_ecotaxe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(64) NOT NULL, - `libelle` varchar(255) DEFAULT NULL, + `code` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `price` double(24,8) DEFAULT NULL, - `organization` varchar(255) DEFAULT NULL, + `organization` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_pays` int(11) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_ecotaxe` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1428,13 +1456,13 @@ DROP TABLE IF EXISTS `llx_c_effectif`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_effectif` ( `id` int(11) NOT NULL, - `code` varchar(12) NOT NULL, - `libelle` varchar(30) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_effectif` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1489,25 +1517,25 @@ DROP TABLE IF EXISTS `llx_c_email_templates`; CREATE TABLE `llx_c_email_templates` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, - `type_template` varchar(32) DEFAULT NULL, - `lang` varchar(6) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `type_template` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `private` smallint(6) NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(255) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `position` smallint(6) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `topic` text, - `content` mediumtext, - `content_lines` text, - `enabled` varchar(255) DEFAULT '1', - `joinfiles` varchar(255) DEFAULT '1', + `topic` text COLLATE utf8_unicode_ci, + `content` mediumtext COLLATE utf8_unicode_ci, + `content_lines` text COLLATE utf8_unicode_ci, + `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', + `joinfiles` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_email_templates` (`entity`,`label`,`lang`), KEY `idx_type` (`type_template`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1583,18 +1611,18 @@ DROP TABLE IF EXISTS `llx_c_field_list`; CREATE TABLE `llx_c_field_list` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `element` varchar(64) NOT NULL, + `element` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `name` varchar(32) NOT NULL, - `alias` varchar(32) NOT NULL, - `title` varchar(32) NOT NULL, - `align` varchar(6) DEFAULT 'left', + `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `alias` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `align` varchar(6) COLLATE utf8_unicode_ci DEFAULT 'left', `sort` tinyint(4) NOT NULL DEFAULT '1', `search` tinyint(4) NOT NULL DEFAULT '0', - `enabled` varchar(255) DEFAULT '1', + `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', `rang` int(11) DEFAULT '0', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1616,11 +1644,11 @@ DROP TABLE IF EXISTS `llx_c_format_cards`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_format_cards` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(50) NOT NULL, - `name` varchar(50) NOT NULL, - `paper_size` varchar(20) NOT NULL, - `orientation` varchar(1) NOT NULL, - `metric` varchar(5) NOT NULL, + `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `paper_size` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `orientation` varchar(1) COLLATE utf8_unicode_ci NOT NULL, + `metric` varchar(5) COLLATE utf8_unicode_ci NOT NULL, `leftmargin` double(24,8) NOT NULL, `topmargin` double(24,8) NOT NULL, `nx` int(11) NOT NULL, @@ -1634,7 +1662,7 @@ CREATE TABLE `llx_c_format_cards` ( `custom_y` double(24,8) NOT NULL, `active` int(11) NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1658,14 +1686,14 @@ CREATE TABLE `llx_c_forme_juridique` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` int(11) NOT NULL, `fk_pays` int(11) NOT NULL, - `libelle` varchar(255) DEFAULT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `isvatexempted` tinyint(4) NOT NULL DEFAULT '0', `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_forme_juridique` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=100221 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=100221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1687,8 +1715,8 @@ DROP TABLE IF EXISTS `llx_c_holiday_types`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_holiday_types` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(16) NOT NULL, - `label` varchar(255) NOT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `affect` int(11) NOT NULL, `delay` int(11) NOT NULL, `newByMonth` double(8,5) NOT NULL DEFAULT '0.00000', @@ -1696,7 +1724,7 @@ CREATE TABLE `llx_c_holiday_types` ( `active` int(11) DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_holiday_types` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1719,11 +1747,11 @@ DROP TABLE IF EXISTS `llx_c_hrm_department`; CREATE TABLE `llx_c_hrm_department` ( `rowid` int(11) NOT NULL, `pos` tinyint(4) NOT NULL DEFAULT '0', - `code` varchar(16) NOT NULL, - `label` varchar(50) DEFAULT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1746,12 +1774,12 @@ DROP TABLE IF EXISTS `llx_c_hrm_function`; CREATE TABLE `llx_c_hrm_function` ( `rowid` int(11) NOT NULL, `pos` tinyint(4) NOT NULL DEFAULT '0', - `code` varchar(16) NOT NULL, - `label` varchar(50) DEFAULT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `c_level` tinyint(4) NOT NULL DEFAULT '0', `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1773,12 +1801,12 @@ DROP TABLE IF EXISTS `llx_c_incoterms`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_incoterms` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `libelle` varchar(255) NOT NULL, + `code` varchar(3) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_incoterms` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1800,14 +1828,14 @@ DROP TABLE IF EXISTS `llx_c_input_method`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_input_method` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(30) DEFAULT NULL, - `libelle` varchar(60) DEFAULT NULL, + `code` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `libelle` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`), UNIQUE KEY `uk_c_input_method` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1829,13 +1857,13 @@ DROP TABLE IF EXISTS `llx_c_input_reason`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_input_reason` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(30) NOT NULL, - `label` varchar(60) NOT NULL, + `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(60) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_input_reason` (`code`) -) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1857,14 +1885,14 @@ DROP TABLE IF EXISTS `llx_c_lead_status`; /*!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, + `code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci 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; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1877,6 +1905,33 @@ INSERT INTO `llx_c_lead_status` VALUES (1,'PROSP','Prospection',10,0.00,1),(2,'Q /*!40000 ALTER TABLE `llx_c_lead_status` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_c_lead_type` +-- + +DROP TABLE IF EXISTS `llx_c_lead_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_lead_type` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`rowid`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_lead_type` +-- + +LOCK TABLES `llx_c_lead_type` WRITE; +/*!40000 ALTER TABLE `llx_c_lead_type` DISABLE KEYS */; +INSERT INTO `llx_c_lead_type` VALUES (1,'SUPP','Support',1),(2,'TRAIN','Formation',1),(3,'ADVI','Conseil',1); +/*!40000 ALTER TABLE `llx_c_lead_type` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_c_methode_commande_fournisseur` -- @@ -1886,12 +1941,12 @@ DROP TABLE IF EXISTS `llx_c_methode_commande_fournisseur`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_methode_commande_fournisseur` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(30) DEFAULT NULL, - `libelle` varchar(60) DEFAULT NULL, + `code` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `libelle` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1914,15 +1969,15 @@ DROP TABLE IF EXISTS `llx_c_paiement`; CREATE TABLE `llx_c_paiement` ( `id` int(11) NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `code` varchar(6) NOT NULL, - `libelle` varchar(62) DEFAULT NULL, + `code` varchar(6) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(62) COLLATE utf8_unicode_ci DEFAULT NULL, `type` smallint(6) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `accountancy_code` varchar(32) DEFAULT NULL, - `module` varchar(32) DEFAULT NULL, + `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', UNIQUE KEY `uk_c_paiement` (`id`,`entity`,`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1944,15 +1999,15 @@ DROP TABLE IF EXISTS `llx_c_paper_format`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_paper_format` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(16) NOT NULL, - `label` varchar(50) NOT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `width` float(6,2) DEFAULT '0.00', `height` float(6,2) DEFAULT '0.00', - `unit` varchar(5) NOT NULL, + `unit` varchar(5) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1975,18 +2030,18 @@ DROP TABLE IF EXISTS `llx_c_payment_term`; CREATE TABLE `llx_c_payment_term` ( `rowid` int(11) NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `code` varchar(16) DEFAULT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, `active` tinyint(4) DEFAULT '1', - `libelle` varchar(255) DEFAULT NULL, - `libelle_facture` text, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `libelle_facture` text COLLATE utf8_unicode_ci, `type_cdr` tinyint(4) DEFAULT NULL, `nbjour` smallint(6) DEFAULT NULL, `decalage` smallint(6) DEFAULT NULL, - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', UNIQUE KEY `uk_c_payment_term` (`rowid`,`entity`,`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2008,10 +2063,10 @@ DROP TABLE IF EXISTS `llx_c_price_expression`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_price_expression` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(20) NOT NULL, - `expression` varchar(80) NOT NULL, + `title` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `expression` varchar(80) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2032,11 +2087,11 @@ DROP TABLE IF EXISTS `llx_c_price_global_variable`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_price_global_variable` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(20) NOT NULL, - `description` text, + `code` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, `value` double(24,8) DEFAULT '0.00000000', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2058,14 +2113,14 @@ DROP TABLE IF EXISTS `llx_c_price_global_variable_updater`; CREATE TABLE `llx_c_price_global_variable_updater` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `type` int(11) NOT NULL, - `description` text, - `parameters` text, + `description` text COLLATE utf8_unicode_ci, + `parameters` text COLLATE utf8_unicode_ci, `fk_variable` int(11) NOT NULL, `update_interval` int(11) DEFAULT '0', `next_update` int(11) DEFAULT '0', - `last_status` text, + `last_status` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2086,12 +2141,12 @@ DROP TABLE IF EXISTS `llx_c_propalst`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_propalst` ( `id` smallint(6) NOT NULL, - `code` varchar(12) NOT NULL, - `label` varchar(30) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `uk_c_propalst` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2112,13 +2167,13 @@ DROP TABLE IF EXISTS `llx_c_prospectlevel`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_prospectlevel` ( - `code` varchar(12) NOT NULL, - `label` varchar(30) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, `active` smallint(6) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2142,16 +2197,16 @@ CREATE TABLE `llx_c_regions` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code_region` int(11) NOT NULL, `fk_pays` int(11) NOT NULL, - `cheflieu` varchar(50) DEFAULT NULL, + `cheflieu` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `tncc` int(11) DEFAULT NULL, - `nom` varchar(50) DEFAULT NULL, + `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `code_region` (`code_region`), 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=23346 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=23346 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2175,13 +2230,13 @@ CREATE TABLE `llx_c_revenuestamp` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_pays` int(11) NOT NULL, `taux` double NOT NULL, - `note` varchar(128) DEFAULT NULL, + `note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `accountancy_code_sell` varchar(32) DEFAULT NULL, - `accountancy_code_buy` varchar(32) DEFAULT NULL, - `revenuestamp_type` varchar(16) NOT NULL DEFAULT 'fixed', + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `revenuestamp_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'fixed', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2204,14 +2259,14 @@ DROP TABLE IF EXISTS `llx_c_shipment_mode`; CREATE TABLE `llx_c_shipment_mode` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `code` varchar(30) NOT NULL, - `libelle` varchar(50) NOT NULL, - `description` text, - `tracking` varchar(256) NOT NULL, + `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, + `tracking` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) DEFAULT '0', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2233,13 +2288,13 @@ DROP TABLE IF EXISTS `llx_c_stcomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_stcomm` ( `id` int(11) NOT NULL, - `code` varchar(12) NOT NULL, - `libelle` varchar(30) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `picto` varchar(128) DEFAULT NULL, + `picto` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_stcomm` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2262,20 +2317,20 @@ DROP TABLE IF EXISTS `llx_c_tva`; CREATE TABLE `llx_c_tva` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_pays` int(11) NOT NULL, - `code` varchar(10) DEFAULT '', + `code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `taux` double NOT NULL, - `localtax1` varchar(20) DEFAULT NULL, - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', - `localtax2` varchar(20) DEFAULT NULL, - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `localtax2` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `recuperableonly` int(11) NOT NULL DEFAULT '0', - `note` varchar(128) DEFAULT NULL, + `note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `accountancy_code_sell` varchar(32) DEFAULT NULL, - `accountancy_code_buy` varchar(32) DEFAULT NULL, + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_tva_id` (`fk_pays`,`code`,`taux`,`recuperableonly`) -) ENGINE=InnoDB AUTO_INCREMENT=2477 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2477 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2297,16 +2352,16 @@ DROP TABLE IF EXISTS `llx_c_type_contact`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_type_contact` ( `rowid` int(11) NOT NULL, - `element` varchar(30) NOT NULL, - `source` varchar(8) NOT NULL DEFAULT 'external', - `code` varchar(32) NOT NULL, - `libelle` varchar(64) NOT NULL, + `element` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `source` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'external', + `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_contact_id` (`element`,`source`,`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2328,15 +2383,15 @@ DROP TABLE IF EXISTS `llx_c_type_fees`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_type_fees` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(12) NOT NULL, - `label` varchar(30) DEFAULT NULL, - `accountancy_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `uk_c_type_fees` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2358,12 +2413,12 @@ DROP TABLE IF EXISTS `llx_c_type_resource`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_type_resource` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) NOT NULL, - `label` varchar(64) NOT NULL, + `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_resource_id` (`label`,`code`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2385,15 +2440,15 @@ DROP TABLE IF EXISTS `llx_c_typent`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_typent` ( `id` int(11) NOT NULL, - `code` varchar(12) NOT NULL, - `libelle` varchar(64) DEFAULT NULL, + `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `uk_c_typent` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2415,13 +2470,13 @@ DROP TABLE IF EXISTS `llx_c_units`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_units` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(3) DEFAULT NULL, - `label` varchar(50) DEFAULT NULL, - `short_label` varchar(5) DEFAULT NULL, + `code` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `short_label` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_units_code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2443,11 +2498,11 @@ DROP TABLE IF EXISTS `llx_c_ziptown`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_ziptown` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(5) DEFAULT NULL, + `code` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_county` int(11) DEFAULT NULL, `fk_pays` int(11) NOT NULL DEFAULT '0', - `zip` varchar(10) NOT NULL, - `town` varchar(255) NOT NULL, + `zip` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `town` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ziptown_fk_pays` (`zip`,`town`,`fk_pays`), @@ -2456,7 +2511,7 @@ CREATE TABLE `llx_c_ziptown` ( KEY `idx_c_ziptown_zip` (`zip`), CONSTRAINT `fk_c_ziptown_fk_county` FOREIGN KEY (`fk_county`) REFERENCES `llx_c_departements` (`rowid`), CONSTRAINT `fk_c_ziptown_fk_pays` FOREIGN KEY (`fk_pays`) REFERENCES `llx_c_pays` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2478,19 +2533,19 @@ DROP TABLE IF EXISTS `llx_categorie`; CREATE TABLE `llx_categorie` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_parent` int(11) NOT NULL DEFAULT '0', - `label` varchar(255) NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type` tinyint(4) NOT NULL DEFAULT '1', `entity` int(11) NOT NULL DEFAULT '1', - `description` text, + `description` text COLLATE utf8_unicode_ci, `fk_soc` int(11) DEFAULT NULL, `visible` tinyint(4) NOT NULL DEFAULT '1', - `import_key` varchar(14) DEFAULT NULL, - `color` varchar(8) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `color` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_categorie_ref` (`entity`,`fk_parent`,`label`,`type`), KEY `idx_categorie_type` (`type`), KEY `idx_categorie_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2513,13 +2568,13 @@ DROP TABLE IF EXISTS `llx_categorie_account`; CREATE TABLE `llx_categorie_account` ( `fk_categorie` int(11) NOT NULL, `fk_account` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_account`), KEY `idx_categorie_account_fk_categorie` (`fk_categorie`), KEY `idx_categorie_account_fk_account` (`fk_account`), CONSTRAINT `fk_categorie_account_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_account_fk_account` FOREIGN KEY (`fk_account`) REFERENCES `llx_bank_account` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2543,7 +2598,7 @@ CREATE TABLE `llx_categorie_association` ( `fk_categorie_fille` int(11) NOT NULL, UNIQUE KEY `uk_categorie_association` (`fk_categorie_mere`,`fk_categorie_fille`), UNIQUE KEY `uk_categorie_association_fk_categorie_fille` (`fk_categorie_fille`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2566,13 +2621,13 @@ DROP TABLE IF EXISTS `llx_categorie_contact`; CREATE TABLE `llx_categorie_contact` ( `fk_categorie` int(11) NOT NULL, `fk_socpeople` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_socpeople`), KEY `idx_categorie_contact_fk_categorie` (`fk_categorie`), KEY `idx_categorie_contact_fk_socpeople` (`fk_socpeople`), CONSTRAINT `fk_categorie_contact_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_contact_fk_socpeople` FOREIGN KEY (`fk_socpeople`) REFERENCES `llx_socpeople` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2595,13 +2650,13 @@ DROP TABLE IF EXISTS `llx_categorie_fournisseur`; CREATE TABLE `llx_categorie_fournisseur` ( `fk_categorie` int(11) NOT NULL, `fk_soc` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_soc`), KEY `idx_categorie_fournisseur_fk_categorie` (`fk_categorie`), KEY `idx_categorie_fournisseur_fk_societe` (`fk_soc`), CONSTRAINT `fk_categorie_fournisseur_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_fournisseur_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2610,7 +2665,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),(1,10,NULL),(9,2,NULL); +INSERT INTO `llx_categorie_fournisseur` VALUES (1,2,NULL),(1,10,NULL); /*!40000 ALTER TABLE `llx_categorie_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -2624,13 +2679,13 @@ DROP TABLE IF EXISTS `llx_categorie_lang`; CREATE TABLE `llx_categorie_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_category` int(11) NOT NULL DEFAULT '0', - `lang` varchar(5) NOT NULL DEFAULT '0', - `label` varchar(255) NOT NULL, - `description` text, + `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_category_lang` (`fk_category`,`lang`), CONSTRAINT `fk_category_lang_fk_category` FOREIGN KEY (`fk_category`) REFERENCES `llx_categorie` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2657,7 +2712,7 @@ CREATE TABLE `llx_categorie_member` ( KEY `idx_categorie_member_fk_member` (`fk_member`), CONSTRAINT `fk_categorie_member_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_member_member_rowid` FOREIGN KEY (`fk_member`) REFERENCES `llx_adherent` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2679,13 +2734,13 @@ DROP TABLE IF EXISTS `llx_categorie_product`; CREATE TABLE `llx_categorie_product` ( `fk_categorie` int(11) NOT NULL, `fk_product` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_product`), KEY `idx_categorie_product_fk_categorie` (`fk_categorie`), KEY `idx_categorie_product_fk_product` (`fk_product`), CONSTRAINT `fk_categorie_product_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_product_product_rowid` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2708,14 +2763,14 @@ DROP TABLE IF EXISTS `llx_categorie_project`; CREATE TABLE `llx_categorie_project` ( `fk_categorie` int(11) NOT NULL, `fk_project` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_project`), KEY `idx_categorie_project_fk_categorie` (`fk_categorie`), KEY `idx_categorie_project_fk_project` (`fk_project`), CONSTRAINT `fk_categorie_project_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_project_fk_project` FOREIGN KEY (`fk_project`) REFERENCES `llx_projet` (`rowid`), CONSTRAINT `fk_categorie_project_fk_project_rowid` FOREIGN KEY (`fk_project`) REFERENCES `llx_projet` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2737,13 +2792,13 @@ DROP TABLE IF EXISTS `llx_categorie_societe`; CREATE TABLE `llx_categorie_societe` ( `fk_categorie` int(11) NOT NULL, `fk_soc` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_soc`), KEY `idx_categorie_societe_fk_categorie` (`fk_categorie`), KEY `idx_categorie_societe_fk_societe` (`fk_soc`), CONSTRAINT `fk_categorie_societe_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_societe_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2752,7 +2807,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),(12,10,NULL),(12,11,NULL),(14,11,NULL); +INSERT INTO `llx_categorie_societe` VALUES (12,10,NULL),(12,11,NULL),(14,11,NULL); /*!40000 ALTER TABLE `llx_categorie_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -2766,13 +2821,13 @@ DROP TABLE IF EXISTS `llx_categorie_user`; CREATE TABLE `llx_categorie_user` ( `fk_categorie` int(11) NOT NULL, `fk_user` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_user`), KEY `idx_categorie_user_fk_categorie` (`fk_categorie`), KEY `idx_categorie_user_fk_user` (`fk_user`), CONSTRAINT `fk_categorie_user_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), CONSTRAINT `fk_categorie_user_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2795,10 +2850,10 @@ CREATE TABLE `llx_categories_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_categories_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2820,7 +2875,7 @@ DROP TABLE IF EXISTS `llx_chargesociales`; CREATE TABLE `llx_chargesociales` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `date_ech` datetime NOT NULL, - `libelle` varchar(80) NOT NULL, + `libelle` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_type` int(11) NOT NULL, `fk_account` int(11) DEFAULT NULL, @@ -2831,14 +2886,14 @@ CREATE TABLE `llx_chargesociales` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `ref` varchar(16) DEFAULT NULL, + `ref` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2863,11 +2918,11 @@ CREATE TABLE `llx_commande` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(255) DEFAULT NULL, - `ref_client` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, @@ -2887,12 +2942,12 @@ CREATE TABLE `llx_commande` ( `localtax2` double(24,8) DEFAULT '0.00000000', `total_ht` double(24,8) DEFAULT '0.00000000', `total_ttc` double(24,8) DEFAULT '0.00000000', - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `facture` tinyint(4) DEFAULT '0', `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) DEFAULT NULL, + `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `date_livraison` date DEFAULT NULL, @@ -2901,17 +2956,17 @@ CREATE TABLE `llx_commande` ( `fk_availability` int(11) DEFAULT NULL, `fk_input_reason` int(11) DEFAULT NULL, `fk_delivery_address` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_commande_ref` (`ref`,`entity`), KEY `idx_commande_fk_soc` (`fk_soc`), @@ -2926,7 +2981,7 @@ CREATE TABLE `llx_commande` ( CONSTRAINT `fk_commande_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_commande_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_commande_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2950,10 +3005,10 @@ CREATE TABLE `llx_commande_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2976,10 +3031,10 @@ CREATE TABLE `llx_commande_fournisseur` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_soc` int(11) NOT NULL, - `ref` varchar(255) DEFAULT NULL, + `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_supplier` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_supplier` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_projet` int(11) DEFAULT '0', `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -3002,31 +3057,31 @@ CREATE TABLE `llx_commande_fournisseur` ( `localtax2` double(24,8) DEFAULT '0.00000000', `total_ht` double(24,8) DEFAULT '0.00000000', `total_ttc` double(24,8) DEFAULT '0.00000000', - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_input_method` int(11) DEFAULT '0', `fk_cond_reglement` int(11) DEFAULT '0', `fk_mode_reglement` int(11) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` datetime DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_commande_fournisseur_ref` (`ref`,`fk_soc`,`entity`), KEY `idx_commande_fournisseur_fk_soc` (`fk_soc`), KEY `billed` (`billed`), CONSTRAINT `fk_commande_fournisseur_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3055,15 +3110,15 @@ CREATE TABLE `llx_commande_fournisseur_dispatch` ( `fk_entrepot` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, + `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `batch` varchar(30) DEFAULT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseur_dispatch_fk_commande` (`fk_commande`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3086,10 +3141,10 @@ CREATE TABLE `llx_commande_fournisseur_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseur_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3115,9 +3170,9 @@ CREATE TABLE `llx_commande_fournisseur_log` ( `fk_commande` int(11) NOT NULL, `fk_statut` smallint(6) NOT NULL, `fk_user` int(11) NOT NULL, - `comment` varchar(255) DEFAULT NULL, + `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3142,15 +3197,15 @@ CREATE TABLE `llx_commande_fournisseurdet` ( `fk_commande` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `ref` varchar(50) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `tva_tx` double(6,3) DEFAULT '0.000', - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -3164,12 +3219,12 @@ CREATE TABLE `llx_commande_fournisseurdet` ( `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, `info_bits` int(11) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `special_code` int(11) DEFAULT '0', `rang` int(11) DEFAULT '0', `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -3177,7 +3232,7 @@ CREATE TABLE `llx_commande_fournisseurdet` ( PRIMARY KEY (`rowid`), KEY `fk_commande_fournisseurdet_fk_unit` (`fk_unit`), CONSTRAINT `fk_commande_fournisseurdet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3201,10 +3256,10 @@ CREATE TABLE `llx_commande_fournisseurdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseurdet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3228,14 +3283,14 @@ CREATE TABLE `llx_commandedet` ( `fk_commande` int(11) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT NULL, - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT NULL, - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -3255,11 +3310,11 @@ CREATE TABLE `llx_commandedet` ( `buy_price_ht` double(24,8) DEFAULT '0.00000000', `special_code` int(10) unsigned DEFAULT '0', `rang` int(11) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_commandefourndet` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -3270,7 +3325,7 @@ CREATE TABLE `llx_commandedet` ( KEY `fk_commandedet_fk_unit` (`fk_unit`), CONSTRAINT `fk_commandedet_fk_commande` FOREIGN KEY (`fk_commande`) REFERENCES `llx_commande` (`rowid`), CONSTRAINT `fk_commandedet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=292 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=292 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3294,10 +3349,10 @@ CREATE TABLE `llx_commandedet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commandedet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3339,6 +3394,37 @@ LOCK TABLES `llx_comment` WRITE; /*!40000 ALTER TABLE `llx_comment` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_cond_reglement` +-- + +DROP TABLE IF EXISTS `llx_cond_reglement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_cond_reglement` ( + `rowid` int(11) NOT NULL, + `code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `sortorder` smallint(6) DEFAULT NULL, + `active` tinyint(4) DEFAULT '1', + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `libelle_facture` text COLLATE utf8_unicode_ci, + `fdm` tinyint(4) DEFAULT NULL, + `nbjour` smallint(6) DEFAULT NULL, + `decalage` smallint(6) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_cond_reglement` +-- + +LOCK TABLES `llx_cond_reglement` WRITE; +/*!40000 ALTER TABLE `llx_cond_reglement` DISABLE KEYS */; +INSERT INTO `llx_cond_reglement` VALUES (1,'RECEP',1,1,'A réception','Réception de facture',0,0,NULL),(2,'30D',2,1,'30 jours','Réglement à 30 jours',0,30,NULL),(3,'30DENDMONTH',3,1,'30 jours fin de mois','Réglement à 30 jours fin de mois',1,30,NULL),(4,'60D',4,1,'60 jours','Réglement à 60 jours',0,60,NULL),(5,'60DENDMONTH',5,1,'60 jours fin de mois','Réglement à 60 jours fin de mois',1,60,NULL); +/*!40000 ALTER TABLE `llx_cond_reglement` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_const` -- @@ -3348,16 +3434,16 @@ DROP TABLE IF EXISTS `llx_const`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_const` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `value` text NOT NULL, - `type` varchar(6) DEFAULT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `visible` tinyint(4) NOT NULL DEFAULT '1', - `note` text, + `note` text COLLATE utf8_unicode_ci, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=6570 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6588 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3366,7 +3452,7 @@ CREATE TABLE `llx_const` ( LOCK TABLES `llx_const` WRITE; /*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; -INSERT INTO `llx_const` VALUES (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'),(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'),(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'),(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,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(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'),(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'),(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'),(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'),(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'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','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'),(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'),(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'),(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'),(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'),(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'),(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'),(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'),(5288,'DONATION_ACCOUNTINGACCOUNT',1,'7581','chaine',0,'Compte comptable de remise des versements ou dons','2015-07-19 13:41:21'),(5349,'MAIN_SEARCHFORM_CONTACT',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'),(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'),(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'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2015-11-15 22:39:05'),(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'),(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'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2015-11-15 22:39:33'),(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'),(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'),(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'),(5541,'MODULE_GOOGLE_DEBUG',1,'0','chaine',1,'','2016-01-22 13:34:57'),(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'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2016-01-22 17:28:42'),(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'),(5612,'MAIN_ENABLE_LOG_TO_HTML',0,'0','chaine',1,'If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL','2016-03-13 10:54:45'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2016-03-13 10:54:46'),(5626,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1',NULL,0,NULL,'2016-07-30 11:13:20'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2016-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2016-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2016-07-30 11:13:20'),(5632,'MAIN_MODULE_RESOURCE',1,'1',NULL,0,NULL,'2016-07-30 11:13:32'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2016-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2016-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2016-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2016-07-30 11:15:04'),(5639,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2016-07-30 11:15:25'),(5640,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2016-07-30 11:15:25'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2016-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2016-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5712,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2016-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2016-07-30 16:32:20'),(5810,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2016-07-30 18:36:15'),(5813,'USER_PASSWORD_PATTERN',1,'8;1;1;1;3;1','chaine',0,'','2016-07-31 16:04:58'),(5814,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2016-07-31 21:14:32'),(5830,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,NULL,'2017-01-29 15:11:51'),(5831,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'6162','chaine',0,NULL,'2017-01-29 15:11:51'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5834,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,NULL,'2017-01-29 15:11:56'),(5839,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5856,'MAIN_MODULE_PRINTING',1,'1',NULL,0,NULL,'2017-01-29 15:12:44'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5887,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5888,'PROJECT_HIDE_TASKS',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5889,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5890,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5891,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5892,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5893,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5894,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5895,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5896,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5897,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5898,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5899,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5900,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5901,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5902,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5903,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5904,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5905,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5906,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5907,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5908,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5909,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5910,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5911,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5912,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5913,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5914,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5915,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5916,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5917,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5918,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5919,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5920,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5921,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5922,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5923,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5924,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5926,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5927,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5928,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5929,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5930,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5996,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2017-02-12 19:20:04'),(5999,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2017-02-12 19:20:04'),(6000,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2017-02-12 19:20:04'),(6004,'MAIN_MODULE_MULTICOMPANY_CSS',1,'[\"\\/multicompany\\/css\\/multicompany.css.php\"]','chaine',0,NULL,'2017-02-15 17:17:11'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6047,'MAIN_MODULE_SYSLOG',0,'1',NULL,0,NULL,'2017-02-15 22:36:58'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6074,'CABINETMED_DELAY_TO_LOCK_RECORD',1,'','chaine',1,'Number of days before locking edit of consultation','2017-02-21 00:04:15'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6101,'MAIN_MODULE_ACCOUNTING',1,'1',NULL,0,NULL,'2017-05-12 09:14:30'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6108,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_BILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6110,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_UNBILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6111,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6112,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6113,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6114,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6115,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6116,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6117,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6118,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAYED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6119,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6120,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6121,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6137,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2017-08-28 10:19:58'),(6138,'MAIN_MULTILANGS',1,'1','chaine',0,'','2017-08-28 10:19:58'),(6139,'MAIN_THEME',1,'eldy','chaine',0,'','2017-08-28 10:19:58'),(6140,'THEME_ELDY_USE_HOVER',1,'edf4fb','chaine',0,'','2017-08-28 10:19:58'),(6141,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2017-08-28 10:19:59'),(6142,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2017-08-28 10:19:59'),(6143,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6144,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6145,'MAIN_START_WEEK',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6146,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2017-08-28 10:19:59'),(6147,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2017-08-28 10:19:59'),(6148,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6149,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6150,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2017-08-28 10:19:59'),(6151,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2017-08-28 10:19:59'),(6152,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2017-08-28 10:19:59'),(6153,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6353,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6354,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6355,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6356,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6461,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2017-09-06 08:51:11'),(6462,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2017-09-06 08:51:11'),(6463,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street..ll..ee \"','chaine',0,'','2017-09-06 08:51:11'),(6464,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2017-09-06 08:51:12'),(6465,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2017-09-06 08:51:12'),(6466,'MAIN_INFO_SOCIETE_STATE',1,'290','chaine',0,'','2017-09-06 08:51:12'),(6467,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2017-09-06 08:51:12'),(6468,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2017-09-06 08:51:12'),(6469,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2017-09-06 08:51:12'),(6470,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2017-09-06 08:51:12'),(6471,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2017-09-06 08:51:12'),(6472,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company\r\n\"ee\"','chaine',0,'','2017-09-06 08:51:12'),(6473,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2017-09-06 08:51:12'),(6474,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2017-09-06 08:51:12'),(6475,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2017-09-06 08:51:12'),(6476,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6477,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2017-09-06 08:51:12'),(6478,'MAIN_INFO_SIRET',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6479,'MAIN_INFO_APE',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6480,'MAIN_INFO_RCS',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6481,'MAIN_INFO_PROFID5',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6482,'MAIN_INFO_TVAINTRA',1,'FR1234567','chaine',0,'','2017-09-06 08:51:12'),(6483,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2017-09-06 08:51:12'),(6484,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2017-09-06 08:51:12'),(6485,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6486,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2017-09-06 08:51:12'),(6487,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2017-09-06 08:51:12'),(6488,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6489,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6490,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6491,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6545,'MAIN_MODULE_AGENDA',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6546,'MAIN_MODULE_BARCODE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6547,'MAIN_MODULE_CRON',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6548,'MAIN_MODULE_COMMANDE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6549,'MAIN_MODULE_DON',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6550,'MAIN_MODULE_ECM',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6551,'MAIN_MODULE_FACTURE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6552,'MAIN_MODULE_FOURNISSEUR',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6553,'MAIN_MODULE_HOLIDAY',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6554,'MAIN_MODULE_HOLIDAY_TABS_0',1,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__','chaine',0,NULL,'2018-01-19 11:17:54'),(6555,'MAIN_MODULE_OPENSURVEY',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6556,'MAIN_MODULE_SOCIETE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6557,'MAIN_MODULE_SERVICE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6558,'MAIN_MODULE_USER',0,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6559,'MAIN_MODULE_SALARIES',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"82.240.38.230\"}','2018-01-19 11:17:54'),(6560,'MAIN_VERSION_LAST_UPGRADE',0,'7.0.0-beta','chaine',0,'Dolibarr version for last upgrade','2018-01-19 11:17:56'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6563,'MAIN_MODULE_BLOCKEDLOG',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6568,'MAIN_MODULE_VARIANTS',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:04'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'); +INSERT INTO `llx_const` VALUES (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'),(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'),(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'),(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,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(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'),(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'),(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'),(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'),(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'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','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'),(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'),(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'),(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'),(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'),(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'),(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'),(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'),(5288,'DONATION_ACCOUNTINGACCOUNT',1,'7581','chaine',0,'Compte comptable de remise des versements ou dons','2015-07-19 13:41:21'),(5349,'MAIN_SEARCHFORM_CONTACT',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'),(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'),(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'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2015-11-15 22:39:05'),(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'),(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'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2015-11-15 22:39:33'),(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'),(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'),(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'),(5541,'MODULE_GOOGLE_DEBUG',1,'0','chaine',1,'','2016-01-22 13:34:57'),(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'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2016-01-22 17:28:42'),(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'),(5612,'MAIN_ENABLE_LOG_TO_HTML',0,'0','chaine',1,'If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL','2016-03-13 10:54:45'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2016-03-13 10:54:46'),(5626,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1',NULL,0,NULL,'2016-07-30 11:13:20'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2016-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2016-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2016-07-30 11:13:20'),(5632,'MAIN_MODULE_RESOURCE',1,'1',NULL,0,NULL,'2016-07-30 11:13:32'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2016-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2016-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2016-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2016-07-30 11:15:04'),(5639,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2016-07-30 11:15:25'),(5640,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2016-07-30 11:15:25'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2016-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2016-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5712,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2016-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2016-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2016-07-30 16:32:20'),(5810,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2016-07-30 18:36:15'),(5813,'USER_PASSWORD_PATTERN',1,'8;1;1;1;3;1','chaine',0,'','2016-07-31 16:04:58'),(5814,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2016-07-31 21:14:32'),(5830,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,NULL,'2017-01-29 15:11:51'),(5831,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'6162','chaine',0,NULL,'2017-01-29 15:11:51'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5834,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,NULL,'2017-01-29 15:11:56'),(5839,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5856,'MAIN_MODULE_PRINTING',1,'1',NULL,0,NULL,'2017-01-29 15:12:44'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5887,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5888,'PROJECT_HIDE_TASKS',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5889,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5890,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5891,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5892,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5893,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5894,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5895,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5896,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5897,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5898,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5899,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5900,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5901,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5902,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5903,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5904,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5905,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5906,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5907,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5908,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5909,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5910,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5911,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5912,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5913,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5914,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5915,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5916,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5917,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5918,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5919,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5920,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5921,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5922,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5923,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5924,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5926,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5927,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5928,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5929,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5930,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5996,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2017-02-12 19:20:04'),(5999,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2017-02-12 19:20:04'),(6000,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2017-02-12 19:20:04'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6047,'MAIN_MODULE_SYSLOG',0,'1',NULL,0,NULL,'2017-02-15 22:36:58'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6074,'CABINETMED_DELAY_TO_LOCK_RECORD',1,'','chaine',1,'Number of days before locking edit of consultation','2017-02-21 00:04:15'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6101,'MAIN_MODULE_ACCOUNTING',1,'1',NULL,0,NULL,'2017-05-12 09:14:30'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6108,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_BILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6110,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_UNBILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6111,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6112,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6113,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6114,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6115,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6116,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6117,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6118,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAYED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6119,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6120,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6121,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6137,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2017-08-28 10:19:58'),(6138,'MAIN_MULTILANGS',1,'1','chaine',0,'','2017-08-28 10:19:58'),(6139,'MAIN_THEME',1,'eldy','chaine',0,'','2017-08-28 10:19:58'),(6140,'THEME_ELDY_USE_HOVER',1,'edf4fb','chaine',0,'','2017-08-28 10:19:58'),(6141,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2017-08-28 10:19:59'),(6142,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2017-08-28 10:19:59'),(6143,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6144,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6145,'MAIN_START_WEEK',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6146,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2017-08-28 10:19:59'),(6147,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2017-08-28 10:19:59'),(6148,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6149,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6150,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2017-08-28 10:19:59'),(6151,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2017-08-28 10:19:59'),(6152,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2017-08-28 10:19:59'),(6153,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6353,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6354,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6355,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6356,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6461,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2017-09-06 08:51:11'),(6462,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2017-09-06 08:51:11'),(6463,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street..ll..ee \"','chaine',0,'','2017-09-06 08:51:11'),(6464,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2017-09-06 08:51:12'),(6465,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2017-09-06 08:51:12'),(6466,'MAIN_INFO_SOCIETE_STATE',1,'290','chaine',0,'','2017-09-06 08:51:12'),(6467,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2017-09-06 08:51:12'),(6468,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2017-09-06 08:51:12'),(6469,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2017-09-06 08:51:12'),(6470,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2017-09-06 08:51:12'),(6471,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2017-09-06 08:51:12'),(6472,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company\r\n\"ee\"','chaine',0,'','2017-09-06 08:51:12'),(6473,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2017-09-06 08:51:12'),(6474,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2017-09-06 08:51:12'),(6475,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2017-09-06 08:51:12'),(6476,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6477,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2017-09-06 08:51:12'),(6478,'MAIN_INFO_SIRET',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6479,'MAIN_INFO_APE',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6480,'MAIN_INFO_RCS',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6481,'MAIN_INFO_PROFID5',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6482,'MAIN_INFO_TVAINTRA',1,'FR1234567','chaine',0,'','2017-09-06 08:51:12'),(6483,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2017-09-06 08:51:12'),(6484,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2017-09-06 08:51:12'),(6485,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2017-09-06 08:51:12'),(6486,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2017-09-06 08:51:12'),(6487,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2017-09-06 08:51:12'),(6488,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6489,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6490,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6491,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2017-09-06 08:51:12'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6568,'MAIN_MODULE_VARIANTS',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:04'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'),(6570,'MAIN_MODULE_AGENDA',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6571,'MAIN_MODULE_BARCODE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6572,'MAIN_MODULE_CRON',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6573,'MAIN_MODULE_COMMANDE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6574,'MAIN_MODULE_DON',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6575,'MAIN_MODULE_ECM',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6576,'MAIN_MODULE_FACTURE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6577,'MAIN_MODULE_FOURNISSEUR',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6578,'MAIN_MODULE_HOLIDAY',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6579,'MAIN_MODULE_HOLIDAY_TABS_0',1,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__','chaine',0,NULL,'2018-03-16 09:54:05'),(6580,'MAIN_MODULE_OPENSURVEY',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6581,'MAIN_MODULE_SOCIETE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6582,'MAIN_MODULE_SERVICE',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6583,'MAIN_MODULE_USER',0,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6584,'MAIN_MODULE_SALARIES',1,'1',NULL,0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2018-03-16 09:54:05'),(6585,'MAIN_VERSION_LAST_UPGRADE',0,'7.0.1','chaine',0,'Dolibarr version for last upgrade','2018-03-16 09:54:07'),(6587,'MAIN_MODULE_BLOCKEDLOG',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2018-03-16 09:57:24'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -3379,9 +3465,9 @@ DROP TABLE IF EXISTS `llx_contrat`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_contrat` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(50) DEFAULT NULL, - `ref_ext` varchar(255) DEFAULT NULL, - `ref_supplier` varchar(50) DEFAULT NULL, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_supplier` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, @@ -3397,21 +3483,21 @@ CREATE TABLE `llx_contrat` ( `fk_user_author` int(11) NOT NULL DEFAULT '0', `fk_user_mise_en_service` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, - `ref_customer` varchar(50) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_customer` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_contrat_ref` (`ref`,`entity`), KEY `idx_contrat_fk_soc` (`fk_soc`), KEY `idx_contrat_fk_user_author` (`fk_user_author`), CONSTRAINT `fk_contrat_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_contrat_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3435,10 +3521,10 @@ CREATE TABLE `llx_contrat_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contrat_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3463,8 +3549,8 @@ CREATE TABLE `llx_contratdet` ( `fk_contrat` int(11) NOT NULL, `fk_product` int(11) DEFAULT NULL, `statut` smallint(6) DEFAULT '0', - `label` text, - `description` text, + `label` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci, `fk_remise_except` int(11) DEFAULT NULL, `date_commande` datetime DEFAULT NULL, `date_ouverture_prevue` datetime DEFAULT NULL, @@ -3472,11 +3558,11 @@ CREATE TABLE `llx_contratdet` ( `date_fin_validite` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, `tva_tx` double(6,3) DEFAULT '0.000', - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double NOT NULL, `remise_percent` double DEFAULT '0', `subprice` double(24,8) DEFAULT '0.00000000', @@ -3494,10 +3580,10 @@ CREATE TABLE `llx_contratdet` ( `fk_user_author` int(11) NOT NULL DEFAULT '0', `fk_user_ouverture` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `commentaire` text, + `commentaire` text COLLATE utf8_unicode_ci, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -3512,7 +3598,7 @@ CREATE TABLE `llx_contratdet` ( CONSTRAINT `fk_contratdet_fk_contrat` FOREIGN KEY (`fk_contrat`) REFERENCES `llx_contrat` (`rowid`), CONSTRAINT `fk_contratdet_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_contratdet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3536,10 +3622,10 @@ CREATE TABLE `llx_contratdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contratdet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3565,12 +3651,12 @@ CREATE TABLE `llx_contratdet_log` ( `date` datetime NOT NULL, `statut` smallint(6) NOT NULL, `fk_user_author` int(11) NOT NULL, - `commentaire` text, + `commentaire` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), KEY `idx_contratdet_log_fk_contratdet` (`fk_contratdet`), KEY `idx_contratdet_log_date` (`date`), CONSTRAINT `fk_contratdet_log_fk_contratdet` FOREIGN KEY (`fk_contratdet`) REFERENCES `llx_contratdet` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3598,10 +3684,10 @@ CREATE TABLE `llx_cotisation` ( `datef` date DEFAULT NULL, `cotisation` double DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_cotisation` (`fk_adherent`,`dateadh`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3625,39 +3711,39 @@ CREATE TABLE `llx_cronjob` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, - `jobtype` varchar(10) NOT NULL, - `label` text NOT NULL, - `command` varchar(255) DEFAULT NULL, - `classesname` varchar(255) DEFAULT NULL, - `objectname` varchar(255) DEFAULT NULL, - `methodename` varchar(255) DEFAULT NULL, - `params` text, - `md5params` varchar(32) DEFAULT NULL, - `module_name` varchar(255) DEFAULT NULL, + `jobtype` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `label` text COLLATE utf8_unicode_ci NOT NULL, + `command` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `classesname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `objectname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `methodename` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `params` text COLLATE utf8_unicode_ci, + `md5params` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `module_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `priority` int(11) DEFAULT '0', `datelastrun` datetime DEFAULT NULL, `datenextrun` datetime DEFAULT NULL, `datestart` datetime DEFAULT NULL, `dateend` datetime DEFAULT NULL, `datelastresult` datetime DEFAULT NULL, - `lastresult` text, - `lastoutput` text, - `unitfrequency` varchar(255) NOT NULL DEFAULT '3600', + `lastresult` text COLLATE utf8_unicode_ci, + `lastoutput` text COLLATE utf8_unicode_ci, + `unitfrequency` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '3600', `frequency` int(11) NOT NULL DEFAULT '0', `nbrun` int(11) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '1', `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) DEFAULT NULL, - `note` text, - `libname` varchar(255) DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, + `libname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT '0', `maxrun` int(11) NOT NULL DEFAULT '0', `autodelete` int(11) DEFAULT '0', `fk_mailing` int(11) DEFAULT NULL, - `test` varchar(255) DEFAULT '1', + `test` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', `processing` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3666,7 +3752,7 @@ CREATE TABLE `llx_cronjob` ( LOCK TABLES `llx_cronjob` WRITE; /*!40000 ALTER TABLE `llx_cronjob` DISABLE KEYS */; -INSERT INTO `llx_cronjob` VALUES (1,'2013-03-23 18:18:39','2013-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2013-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0),(32,'2018-01-19 11:17:54','2018-01-19 11:17:54','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-01-19 11:17:54',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'1',0),(33,'2018-01-19 11:17:54','2018-01-19 11:17:54','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-01-19 11:17:54',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,1,0,0,NULL,'1',0),(34,'2018-01-19 11:17:54','2018-01-19 11:17:54','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,NULL,NULL,'2018-01-19 11:17:54',NULL,NULL,NULL,NULL,'604800',1,NULL,0,NULL,NULL,'MakeLocalDatabaseDump',NULL,1,0,0,NULL,'1',0),(35,'2018-01-19 11:17:54','2018-01-19 11:17:54','method','RecurringInvoices',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-01-19 11:17:54',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'1',0); +INSERT INTO `llx_cronjob` VALUES (1,'2013-03-23 18:18:39','2013-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2013-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0),(36,'2018-03-16 09:54:05','2018-03-16 13:54:05','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-03-16 13:54:05',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'1',0),(37,'2018-03-16 09:54:05','2018-03-16 13:54:05','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-03-16 13:54:05',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,1,0,0,NULL,'1',0),(38,'2018-03-16 09:54:05','2018-03-16 13:54:05','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,NULL,NULL,'2018-03-16 13:54:05',NULL,NULL,NULL,NULL,'604800',1,NULL,0,NULL,NULL,'MakeLocalDatabaseDump',NULL,1,0,0,NULL,'1',0),(39,'2018-03-16 09:54:05','2018-03-16 13:54:05','method','RecurringInvoices',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-03-16 13:54:05',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'1',0); /*!40000 ALTER TABLE `llx_cronjob` ENABLE KEYS */; UNLOCK TABLES; @@ -3708,7 +3794,7 @@ DROP TABLE IF EXISTS `llx_deplacement`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_deplacement` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) DEFAULT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -3716,16 +3802,16 @@ CREATE TABLE `llx_deplacement` ( `fk_user` int(11) NOT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `type` varchar(12) NOT NULL, + `type` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `fk_statut` int(11) NOT NULL DEFAULT '1', `km` double DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT '0', - `note_private` text, - `note_public` text, - `extraparams` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3747,14 +3833,14 @@ DROP TABLE IF EXISTS `llx_document_model`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_document_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `nom` varchar(50) DEFAULT NULL, + `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `type` varchar(20) NOT NULL, - `libelle` varchar(255) DEFAULT NULL, - `description` text, + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=300 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=304 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3763,7 +3849,7 @@ 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),(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'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(270,'aurore',1,'supplier_proposal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(274,'rouget',1,'shipping',NULL,NULL),(275,'typhon',1,'delivery',NULL,NULL),(278,'standard',1,'expensereport',NULL,NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(294,'einstein',1,'order',NULL,NULL),(296,'crabe',1,'invoice',NULL,NULL),(297,'muscadet',1,'order_supplier',NULL,NULL),(298,'html_cerfafr',1,'donation',NULL,NULL),(299,'standard',1,'member',NULL,NULL); +INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',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'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(270,'aurore',1,'supplier_proposal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(274,'rouget',1,'shipping',NULL,NULL),(275,'typhon',1,'delivery',NULL,NULL),(278,'standard',1,'expensereport',NULL,NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(300,'einstein',1,'order',NULL,NULL),(301,'html_cerfafr',1,'donation',NULL,NULL),(302,'crabe',1,'invoice',NULL,NULL),(303,'muscadet',1,'order_supplier',NULL,NULL); /*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; UNLOCK TABLES; @@ -3776,7 +3862,7 @@ DROP TABLE IF EXISTS `llx_don`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_don` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) DEFAULT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_statut` smallint(6) NOT NULL DEFAULT '0', @@ -3785,29 +3871,29 @@ CREATE TABLE `llx_don` ( `amount` double(24,8) DEFAULT NULL, `fk_payment` int(11) DEFAULT NULL, `paid` smallint(6) NOT NULL DEFAULT '0', - `firstname` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `societe` varchar(50) DEFAULT NULL, - `address` text, - `zip` varchar(10) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, - `country` varchar(50) DEFAULT NULL, + `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `societe` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` text COLLATE utf8_unicode_ci, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) NOT NULL, - `email` varchar(255) DEFAULT NULL, - `phone` varchar(24) DEFAULT NULL, - `phone_mobile` varchar(24) DEFAULT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone_mobile` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `public` smallint(6) NOT NULL DEFAULT '1', `fk_projet` int(11) DEFAULT NULL, `fk_user_author` int(11) NOT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `date_valid` datetime DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3831,10 +3917,10 @@ CREATE TABLE `llx_don_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_don_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3855,25 +3941,25 @@ DROP TABLE IF EXISTS `llx_ecm_directories`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_ecm_directories` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(64) NOT NULL, + `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_parent` int(11) DEFAULT NULL, - `description` varchar(255) NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `cachenbofdoc` int(11) NOT NULL DEFAULT '0', - `fullpath` varchar(750) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `fullpath` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_c` datetime DEFAULT NULL, `date_m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `acl` text, + `acl` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_directories` (`label`,`fk_parent`,`entity`), KEY `idx_ecm_directories_fk_user_c` (`fk_user_c`), KEY `idx_ecm_directories_fk_user_m` (`fk_user_m`), CONSTRAINT `fk_ecm_directories_fk_user_c` FOREIGN KEY (`fk_user_c`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_ecm_directories_fk_user_m` FOREIGN KEY (`fk_user_m`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3895,31 +3981,31 @@ DROP TABLE IF EXISTS `llx_ecm_files`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_ecm_files` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) DEFAULT NULL, - `label` varchar(128) NOT NULL, - `share` varchar(128) DEFAULT NULL, + `ref` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, + `share` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `filename` varchar(255) NOT NULL, - `filepath` varchar(255) DEFAULT NULL, - `fullpath_orig` varchar(750) DEFAULT NULL, - `description` text, - `keywords` text, - `cover` text, - `gen_or_uploaded` varchar(12) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `filepath` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `fullpath_orig` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, + `keywords` text COLLATE utf8_unicode_ci, + `cover` text COLLATE utf8_unicode_ci, + `gen_or_uploaded` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_c` datetime DEFAULT NULL, `date_m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `acl` text, + `acl` text COLLATE utf8_unicode_ci, `position` int(11) DEFAULT NULL, - `keyword` varchar(750) DEFAULT NULL, - `src_object_type` varchar(32) DEFAULT NULL, + `keyword` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, + `src_object_type` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `src_object_id` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_files` (`filepath`,`filename`,`entity`), KEY `idx_ecm_files_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3928,44 +4014,10 @@ CREATE TABLE `llx_ecm_files` ( LOCK TABLES `llx_ecm_files` WRITE; /*!40000 ALTER TABLE `llx_ecm_files` DISABLE KEYS */; -INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,1,NULL,NULL,NULL),(5,NULL,'3a9283622bae3469fd90eefd90eb53ea',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1601-0024/FA1601-0024.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 16:23:01','2017-08-30 12:23:01',12,NULL,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(15,'83616b4ec45e835526144ce114979f49','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'dolidroid_114x114.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_114x114.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(16,'6b11123918f12440cac5fa3c3190d2d6','8a0bc12d0e579a5a56e299a1a128ba80',NULL,1,'dolidroid_512x512_en.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_512x512_en.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,2,NULL,NULL,NULL),(17,'5c0ceed2d113af84868710c940e1a921','246708ef260d601dcfa367a6b3258ecf',NULL,1,'dolidroid_screenshot_home_720x1280.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_screenshot_home_720x1280.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,3,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL); +INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,1,NULL,NULL,NULL),(5,'5fe17a68b2f6a73e6326f77fa7b6586c','a60cad66c6da948eb08d5b939f3516ff',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','','',NULL,NULL,'generated',NULL,'2017-08-30 16:23:01','2018-03-16 09:59:31',12,12,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(15,'83616b4ec45e835526144ce114979f49','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'dolidroid_114x114.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_114x114.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(16,'6b11123918f12440cac5fa3c3190d2d6','8a0bc12d0e579a5a56e299a1a128ba80',NULL,1,'dolidroid_512x512_en.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_512x512_en.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,2,NULL,NULL,NULL),(17,'5c0ceed2d113af84868710c940e1a921','246708ef260d601dcfa367a6b3258ecf',NULL,1,'dolidroid_screenshot_home_720x1280.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_screenshot_home_720x1280.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,3,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_ecm_files` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_ecommerce_category` --- - -DROP TABLE IF EXISTS `llx_ecommerce_category`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_ecommerce_category` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `type` tinyint(4) NOT NULL DEFAULT '1', - `description` text COLLATE utf8_unicode_ci, - `fk_category` int(11) NOT NULL, - `fk_site` int(11) NOT NULL, - `remote_id` int(11) NOT NULL, - `remote_parent_id` int(11) DEFAULT NULL, - `last_update` datetime DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_ecommerce_category_fk_site_fk_category` (`fk_site`,`fk_category`), - KEY `idx_ecommerce_category_fk_category` (`fk_category`), - KEY `idx_ecommerce_category_fk_site` (`fk_site`) -) ENGINE=InnoDB AUTO_INCREMENT=2260 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Table transition remote site - Dolibarr'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_ecommerce_category` --- - -LOCK TABLES `llx_ecommerce_category` WRITE; -/*!40000 ALTER TABLE `llx_ecommerce_category` DISABLE KEYS */; -INSERT INTO `llx_ecommerce_category` VALUES (1951,'Root Catalog',0,'',1750,1,3,1,'2007-12-05 04:38:59'),(1952,'Parquets',0,'',1751,1,35,3,'2016-01-19 09:35:20'),(1953,'Parquets massifs exotiques',0,'',1752,1,36,35,'2016-01-19 09:35:44'),(1954,'Parquets massifs salle de bain',0,'',1753,1,135,35,'2016-01-19 09:36:03'),(1955,'Parquets massifs bruts',0,'',1754,1,43,35,'2016-01-19 09:36:24'),(1956,'Parquets massifs naturels',0,'',1755,1,46,35,'2016-01-19 09:36:47'),(1957,'Parquets massifs tendances',0,'',1756,1,136,35,'2016-01-19 09:37:04'),(1958,'Parquets massifs vieillis',0,'',1757,1,227,35,'2016-01-19 09:37:23'),(1959,'Parquets contrecollés classiques',0,'',1758,1,51,35,'2016-01-19 09:37:49'),(1960,'Parquets contrecollés tendance',0,'',1759,1,54,35,'2016-01-19 09:38:09'),(1961,'Parquets contrecollés sols chauffants & rafraîchissants',0,'',1760,1,57,35,'2016-01-19 09:38:35'),(1962,'Parquets contrecollés vieillis',0,'',1761,1,279,35,'2016-01-19 09:38:57'),(1963,'Terrasses',0,'',1762,1,80,3,'2017-03-15 09:46:37'),(1964,'Lames terrasse Bois Exotique',0,'',1763,1,81,80,'2017-03-15 15:34:21'),(1965,'Ipé',0,'',1764,1,461,81,'2017-03-15 09:55:42'),(1966,'Cumaru',0,'',1765,1,462,81,'2017-03-15 09:57:55'),(1967,'Terrasses bois français',0,'',1766,1,84,80,'2015-10-07 15:51:30'),(1968,'Lames Terrasse Bois Composite',0,'',1767,1,86,80,'2017-03-15 14:33:51'),(1969,'Lames Bois Composite',0,'',1768,1,463,86,'2017-03-15 10:24:30'),(1970,'Fixations Lames Composites',0,'',1769,1,464,86,'2017-03-15 10:26:53'),(1971,'Accessoires terrasses',0,'',1770,1,286,80,'2017-03-15 10:58:40'),(1972,'FORET ÉTAGÉ SPAX',0,'',1771,1,396,286,'2017-03-15 10:57:07'),(1973,'CALES ET FEUTRES POUR LAMBOURDE',0,'',1772,1,459,286,'2017-03-15 10:55:50'),(1974,'Feutre Géotextile',0,'',1773,1,466,80,'2017-03-20 15:15:32'),(1975,'Cales pour Lambourdes',0,'',1774,1,394,80,'2017-03-16 13:47:30'),(1976,'Lambourdes Pour Terrasse',0,'',1775,1,465,80,'2017-03-15 10:36:30'),(1977,'Vis Terrasse Inox SPAX',0,'',1776,1,366,80,'2017-03-15 14:26:33'),(1978,'Fixations Terrasse',0,'',1777,1,365,80,'2017-03-20 09:18:10'),(1979,'Plots Pour Terrasse',0,'',1778,1,367,80,'2017-03-16 13:09:09'),(1980,'Redresseur De Lames',0,'',1779,1,368,80,'2017-03-16 13:26:27'),(1981,'Espaceur et gabarit',0,'',1780,1,370,80,'2017-03-16 13:37:38'),(1982,'Forets et Embouts',0,'',1781,1,369,80,'2017-03-16 13:53:06'),(1983,'BANDE D\'ÉTANCHÉITÉ',0,'',1782,1,395,80,'2017-03-15 14:15:22'),(1984,'Luminaires extérieurs terrasses et jardins',0,'',1783,1,290,80,'2017-03-16 13:58:11'),(1985,'ÉCLAIRAGE Á POSER AU SOL',0,'',1784,1,374,290,'2017-03-15 10:59:39'),(1986,'ÉCLAIRAGE MURAL',0,'',1785,1,375,290,'2017-03-15 10:59:44'),(1987,'ÉCLAIRAGE D\'ORIENTATION',0,'',1786,1,376,290,'2017-03-15 11:00:02'),(1988,'Eclairage Design Collection',0,'',1787,1,377,290,'2015-03-05 18:25:35'),(1989,'SPOTS',0,'',1788,1,378,290,'2017-03-15 11:00:08'),(1990,'TRANSFORMATEURS',0,'',1789,1,372,290,'2017-03-15 11:00:14'),(1991,'CÂBLES ET RALLONGES',0,'',1790,1,373,290,'2017-03-15 11:00:24'),(1992,'PROGRAMMATEURS, DÉTECTEURS, TÉLÉCOMMANDES',0,'',1791,1,379,290,'2017-03-15 11:00:31'),(1993,'Revêtements sol & mur',0,'',1792,1,60,3,'2017-02-01 10:13:13'),(1994,'Dalles (cuir, béton ciré...)',0,'',1793,1,63,60,'2017-02-01 13:50:13'),(1995,'Dalles/lames plombantes',0,'',1794,1,401,60,'2017-02-01 13:50:20'),(1996,'Sols en bois',0,'',1795,1,61,60,'2017-02-01 13:50:59'),(1997,'Sols en liège',0,'',1796,1,294,60,'2017-02-01 13:50:52'),(1998,'Stratifiés classiques',0,'',1797,1,68,60,'2016-01-18 17:43:44'),(1999,'Stratifiés tendances',0,'',1798,1,72,60,'2016-01-18 17:44:37'),(2000,'Stratifiés salles de bain',0,'',1799,1,76,60,'2016-01-18 17:45:57'),(2001,'Stratifiés économiques',0,'',1800,1,78,60,'2016-01-18 17:45:32'),(2002,'Stratifiés colle intégrée',0,'',1801,1,421,60,'2016-03-24 10:36:21'),(2003,'Vinyles Click',0,'',1802,1,400,60,'2016-01-18 17:46:15'),(2004,'Vinyles',0,'',1803,1,283,60,'2015-10-29 16:09:39'),(2005,'Lambris',0,'',1804,1,89,60,'2017-02-01 10:13:57'),(2006,'Lambris massifs pin',0,'',1805,1,90,89,'2017-02-01 10:15:07'),(2007,'Accessoires lambris',0,'',1806,1,302,89,'2017-02-01 10:15:13'),(2008,'Entretien',0,'',1807,1,323,3,'2016-01-18 17:08:34'),(2009,'Toutes surfaces',0,'',1808,1,335,323,'2016-03-31 12:14:59'),(2010,'Parquet ciré',0,'',1809,1,359,323,'2016-03-31 12:21:35'),(2011,'Parquet huilé',0,'',1810,1,337,323,'2016-03-31 12:26:55'),(2012,'Parquet vitrifié',0,'',1811,1,339,323,'2016-03-31 12:31:26'),(2013,'Sols stratifié - Vinyl',0,'',1812,1,340,323,'2016-03-31 12:40:36'),(2014,'Terrasse',0,'',1813,1,341,323,'2016-01-18 17:10:11'),(2015,'SATURATEURS ENVIRONNEMENT',0,'',1814,1,342,341,'2017-02-01 14:30:22'),(2016,'SATURATEURS BOIS',0,'',1815,1,343,341,'2017-02-01 14:30:30'),(2017,'SATURATEURS MONOCOUCHE',0,'',1816,1,344,341,'2017-02-01 14:30:41'),(2018,'SATURATEURS OPAQUES',0,'',1817,1,345,341,'2017-02-01 14:33:53'),(2019,'NETTOYANTS - DÉGRISEURS',0,'',1818,1,346,341,'2017-02-01 14:31:20'),(2020,'RÉNOVATEURS COMPOSITES',0,'',1819,1,347,341,'2017-02-01 14:31:33'),(2021,'SYSTÈME ANTI UV',0,'',1820,1,348,341,'2017-02-01 14:32:02'),(2022,'Bardage',0,'',1821,1,349,323,'2016-01-18 17:20:26'),(2023,'HUILES BARDAGES',0,'',1822,1,350,349,'2017-02-01 14:32:18'),(2024,'LASURES OPTEM',0,'',1823,1,352,349,'2017-02-01 14:32:25'),(2025,'LASURES HPS',0,'',1824,1,353,349,'2017-02-01 14:32:32'),(2026,'LASURES ENVIRONNEMENT',0,'',1825,1,354,349,'2017-02-01 14:32:42'),(2027,'PEINTURES ENVIRONNEMENT',0,'',1826,1,355,349,'2017-02-01 14:32:51'),(2028,'SYSTÈME ANTI UV BARDAGE',0,'',1827,1,356,349,'2017-07-04 22:36:49'),(2029,'HUILES POUR TECK',0,'',1828,1,413,349,'2017-02-01 14:33:13'),(2030,'Décapants',0,'',1829,1,357,323,'2016-03-31 12:46:26'),(2031,'Décireurs',0,'',1830,1,361,323,'2016-03-31 12:52:31'),(2032,'Traitements',0,'',1831,1,358,323,'2016-03-31 12:54:22'),(2033,'Pose',0,'',1832,1,128,3,'2015-01-22 14:40:40'),(2034,'Finition',0,'',1833,1,319,3,'2016-01-18 17:25:47'),(2035,'HUILES POUR PARQUETS',0,'',1834,1,239,319,'2017-02-01 13:54:09'),(2036,'HUILES ENVIRONNEMENT',0,'',1835,1,334,239,'2017-02-01 13:55:03'),(2037,'HUILES CIRE',0,'',1836,1,241,239,'2017-02-01 13:55:42'),(2038,'HUILES TRADITIONNELLES',0,'',1837,1,321,239,'2017-02-01 13:55:53'),(2039,'HUILES DURES',0,'',1838,1,322,239,'2017-02-01 13:56:00'),(2040,'LASURES',0,'',1839,1,255,319,'2017-02-01 13:54:17'),(2041,'PEINTURES ENVIRONNEMENT LASURE',0,'',1840,1,325,255,'2017-07-04 22:37:25'),(2042,'LASURES BOIS ENVIRONNEMENT',0,'',1841,1,326,255,'2017-02-01 13:56:35'),(2043,'LASURES OPTEM',0,'',1842,1,327,255,'2017-02-01 13:56:42'),(2044,'LASURES TRADITIONNELLES',0,'',1843,1,328,255,'2017-02-01 13:56:51'),(2045,'PRÉPARATION BOIS EXTERIEUR',0,'',1844,1,329,255,'2017-02-01 13:57:12'),(2046,'VITRIFICATEURS',0,'',1845,1,240,319,'2017-02-01 13:54:27'),(2047,'VITRIFICATEURS TRADITIONNELS',0,'',1846,1,330,240,'2017-02-01 13:57:45'),(2048,'VITRIFICATEURS ENVIRONNEMENT',0,'',1847,1,331,240,'2017-02-01 13:58:00'),(2049,'VITRIFICATEURS OCÉANIC®',0,'',1848,1,332,240,'2017-02-01 13:59:10'),(2050,'VITRIFICATEURS ESCALIERS',0,'',1849,1,333,240,'2017-02-01 13:59:40'),(2051,'VITRIFICATEURS BI COMPOSANTS',0,'',1850,1,404,240,'2017-02-01 13:59:51'),(2052,'Béton - Pavés briques',0,'',1851,1,300,319,'2016-03-25 09:44:34'),(2053,'Peintures sol',0,'',1852,1,271,319,'2016-03-25 09:47:36'),(2054,'Peintures tableau d\'école',0,'',1853,1,360,319,'2016-03-25 09:59:01'),(2055,'Peinture décorative aqua',0,'',1854,1,426,319,'2016-03-25 10:08:28'),(2056,'Primaire fond dur',0,'',1855,1,320,319,'2016-03-25 10:10:34'),(2057,'Teintes parquets - boiseries',0,'',1856,1,324,319,'2016-03-25 10:14:55'),(2058,'Vernis bois',0,'',1857,1,296,319,'2016-03-25 10:16:20'),(2059,'Parquet ciré',0,'',1858,1,414,319,'2016-03-31 12:57:15'),(2060,'Peinture rénovation multi supports',0,'',1859,1,435,319,'2016-10-17 15:33:29'),(2061,'Accessoires disabled',0,'',1860,1,98,3,'2017-07-04 23:32:02'),(2062,'Produits de finitions',0,'',1861,1,108,98,'2015-01-21 11:05:10'),(2063,'Ventes flash',0,'',1862,1,129,3,'2017-02-17 11:21:37'),(2064,'Marques',0,'',1863,1,151,3,'2015-10-16 09:15:18'),(2065,'Blanchon',0,'',1864,1,161,151,'2015-12-14 17:42:03'),(2066,'Colles',0,'',1865,1,263,161,'2015-10-14 17:04:55'),(2067,'Décapants',0,'',1866,1,268,161,'2016-01-18 14:33:19'),(2068,'Décireurs',0,'',1867,1,303,161,'2016-01-18 14:33:39'),(2069,'Dégriseurs bois',0,'',1868,1,250,161,'2016-01-18 14:34:12'),(2070,'Diluants',0,'',1869,1,298,161,'2016-01-22 15:03:39'),(2071,'Encaustique et Cire',0,'',1870,1,416,161,'2016-01-21 09:21:28'),(2072,'Fonds durs',0,'',1871,1,257,161,'2016-01-22 15:04:00'),(2073,'Huiles bardage',0,'',1872,1,351,161,'2016-01-18 14:35:20'),(2074,'Huile-cire dure : Solid\'Oil',0,'',1873,1,249,161,'2016-01-22 15:04:58'),(2075,'Huiles cires',0,'',1874,1,264,161,'2016-01-22 15:05:27'),(2076,'Huile cire béton',0,'',1875,1,254,161,'2016-01-18 14:36:33'),(2077,'Huiles environnement pour parquet',0,'',1876,1,244,161,'2016-01-22 15:06:30'),(2078,'Huile d\'entretien',0,'',1877,1,248,161,'2016-01-11 16:55:17'),(2079,'Huile pour Teck',0,'',1878,1,259,161,'2016-01-18 14:37:06'),(2080,'Lasures bois très longue durée',0,'',1879,1,256,161,'2016-01-18 14:37:20'),(2081,'Lasures OPTEM',0,'',1880,1,316,161,'2016-01-18 14:37:37'),(2082,'Liant mastic à bois',0,'',1881,1,308,161,'2016-01-18 14:37:54'),(2083,'Nettoyants et rénovateurs',0,'',1882,1,253,161,'2016-01-18 14:38:18'),(2084,'Peinture bois très longue durée',0,'',1883,1,315,161,'2016-01-13 10:25:14'),(2085,'Peinture ciment bois',0,'',1884,1,270,161,'2016-01-18 14:38:40'),(2086,'Préparation bois extérieur',0,'',1885,1,317,161,'2016-01-18 14:39:05'),(2087,'Peinture décorative aqua',0,'',1886,1,425,161,'2016-03-01 14:36:39'),(2088,'Prim\' Huile',0,'',1887,1,246,161,'2016-01-18 14:39:19'),(2089,'Saturateur pour terrasse',0,'',1888,1,247,161,'2016-02-24 17:24:11'),(2090,'Savon Naturel des parquets huilés',0,'',1889,1,245,161,'2016-01-18 14:40:23'),(2091,'Système incolore anti-UV',0,'',1890,1,260,161,'2016-01-18 14:41:09'),(2092,'Teintes',0,'',1891,1,258,161,'2016-01-18 14:41:34'),(2093,'Traitement des bois - Trait\'plus -Trait\'découp',0,'',1892,1,251,161,'2016-01-18 14:42:00'),(2094,'Vitrificateurs environnement Blanchon',0,'',1893,1,243,161,'2016-01-18 14:42:24'),(2095,'Vitrificateurs parquet (VP)',0,'',1894,1,261,161,'2016-02-02 14:00:59'),(2096,'Vitrificateurs parquet Océanic®',0,'',1895,1,265,161,'2016-01-19 11:00:23'),(2097,'Vitrificateurs parquet SVP aqua',0,'',1896,1,405,161,'2015-12-04 13:49:33'),(2098,'Vernis bois',0,'',1897,1,297,161,'2016-02-02 14:02:02'),(2099,'Peinture rénovation',0,'',1898,1,436,161,'2016-10-18 14:49:46'),(2100,'Bugal',0,'',1899,1,280,151,'2016-03-26 10:23:08'),(2101,'Bona',0,'',1900,1,269,151,'2016-03-26 10:24:58'),(2102,'Balai Bona spay mop parquet',0,'',1901,1,312,269,'2016-01-18 14:46:36'),(2103,'Balai Bona spay mop sol dur',0,'',1902,1,311,269,'2016-01-18 14:46:56'),(2104,'Entretien parquet vitrifié',0,'',1903,1,306,269,'2016-01-18 14:47:20'),(2105,'Entretien parquet huilé',0,'',1904,1,307,269,'2015-12-01 11:03:24'),(2106,'Savon pour parquet huilé',0,'',1905,1,406,269,'2015-12-02 14:06:24'),(2107,'Huile d\'entretien parquet huilé',0,'',1906,1,407,269,'2015-12-02 15:45:26'),(2108,'Bostik',0,'',1907,1,162,151,'2011-04-08 13:05:04'),(2109,'Chêne de l\'Est',0,'',1908,1,155,151,'2016-03-26 10:25:53'),(2110,'Poussière d\'argile',0,'',1909,1,164,155,'2016-01-18 14:47:59'),(2111,'Plancher d\'autrefois',0,'',1910,1,165,155,'2016-01-18 14:48:11'),(2112,'Privilège Café',0,'',1911,1,166,155,'2016-01-18 14:48:31'),(2113,'Gamme Initiale',0,'',1912,1,423,155,'2016-11-02 11:30:10'),(2114,'Gamme Nature',0,'',1913,1,437,155,'2016-11-02 11:30:22'),(2115,'Cepam',0,'',1914,1,158,151,'2015-07-30 14:04:49'),(2116,'Natural',0,'',1915,1,187,158,'2014-07-02 13:42:36'),(2117,'Grand large',0,'',1916,1,188,158,'2014-07-02 13:42:46'),(2118,'Bord à bord',0,'',1917,1,189,158,'2014-07-02 13:42:57'),(2119,'Clean green',0,'',1918,1,288,151,'2016-03-26 10:28:14'),(2120,'Design by BP',0,'',1919,1,152,151,'2016-03-26 10:28:19'),(2121,'Massif brut',0,'',1920,1,228,152,'2016-01-18 14:49:17'),(2122,'Massif huilé naturel',0,'',1921,1,229,152,'2016-01-18 14:49:33'),(2123,'Lambris',0,'',1922,1,231,152,'2016-01-18 14:49:42'),(2124,'Massifs exotiques',0,'',1923,1,232,152,'2015-12-15 14:03:23'),(2125,'Massifs salle de bain',0,'',1924,1,233,152,'2016-01-18 14:50:01'),(2126,'Médoc 5G',0,'',1925,1,234,152,'2014-04-09 10:25:52'),(2127,'Colosse 5G',0,'',1926,1,235,152,'2014-04-09 10:27:24'),(2128,'Terrasses bois composite',0,'',1927,1,236,152,'2016-01-18 14:50:24'),(2129,'Terrasses bois',0,'',1928,1,237,152,'2016-01-18 14:50:42'),(2130,'Stratifié',0,'',1929,1,238,152,'2016-01-18 14:50:56'),(2131,'Emfi',0,'',1930,1,224,151,'2016-02-05 10:16:51'),(2132,'Cabbani',0,'',1931,1,156,151,'2017-02-21 14:18:31'),(2133,'Collection 02 (Finition Huilée)',0,'',1932,1,192,156,'2017-02-21 15:20:28'),(2134,'Collection 01 (Finition Vernie)',0,'',1933,1,193,156,'2017-02-21 14:58:31'),(2135,'Collection 03 (Finition Vernie)',0,'',1934,1,412,156,'2017-02-22 13:14:49'),(2136,'Garden lights',0,'',1935,1,289,151,'2016-03-26 10:32:34'),(2137,'Transformateurs',0,'',1936,1,380,289,'2015-03-11 16:43:54'),(2138,'Câbles et rallonges',0,'',1937,1,381,289,'2015-03-11 16:44:02'),(2139,'Programmateurs, détecteurs, télécommandes',0,'',1938,1,382,289,'2015-03-11 16:44:09'),(2140,'Eclairage à poser au sol',0,'',1939,1,383,289,'2015-03-11 16:44:17'),(2141,'Eclairage mural',0,'',1940,1,384,289,'2015-03-11 16:44:24'),(2142,'Eclairage d\'orientation',0,'',1941,1,385,289,'2015-03-11 16:44:31'),(2143,'SPOTS',0,'',1942,1,386,289,'2015-03-11 16:44:38'),(2144,'Eclairage Design Collection',0,'',1943,1,387,289,'2015-03-11 16:46:51'),(2145,'Pièces détachées',0,'',1944,1,388,289,'2015-03-11 16:48:03'),(2146,'Hapax',0,'',1945,1,273,151,'2016-02-05 13:14:38'),(2147,'Haro',0,'',1946,1,163,151,'2016-01-14 16:39:17'),(2148,'A l\'Anglaise Série 4000',0,'',1947,1,217,163,'2016-02-25 10:30:24'),(2149,'Toscana Série 3000',0,'',1948,1,218,163,'2016-02-25 10:32:27'),(2150,'Planche large à l\'ancienne - Série 4000',0,'',1949,1,287,163,'2016-01-18 14:58:07'),(2151,'Planche large à l\'ancienne - Série 3000',0,'',1950,1,219,163,'2017-03-21 16:19:37'),(2152,'Célénio Papyrus',0,'',1951,1,222,163,'2016-01-18 14:58:53'),(2153,'Célénio Athos',0,'',1952,1,223,163,'2016-01-18 14:59:06'),(2154,'Célénio Atrium',0,'',1953,1,226,163,'2016-01-18 14:59:19'),(2155,'Gran Via',0,'',1954,1,424,163,'2016-02-25 10:06:45'),(2156,'Tritty 100',0,'',1955,1,242,163,'2016-02-23 15:24:42'),(2157,'Tritty 100 - Silent CT',0,'',1956,1,422,163,'2016-02-01 17:23:41'),(2158,'Tritty 75',0,'',1957,1,285,163,'2016-01-11 16:47:33'),(2159,'Tritty 75 - Silent CT',0,'',1958,1,420,163,'2016-02-01 15:22:18'),(2160,'Haro Sols en liège',0,'',1959,1,293,163,'2017-07-04 22:35:39'),(2161,'Tritty 90',0,'',1960,1,448,163,'2017-01-09 10:28:29'),(2162,'Tritty 90 - Silent CT',0,'',1961,1,449,163,'2017-01-09 10:33:13'),(2163,'Tritty 90 - Silent Pro',0,'',1962,1,450,163,'2017-01-09 10:34:36'),(2164,'A l\'anglaise Série 3500',0,'',1963,1,451,163,'2017-01-10 08:50:28'),(2165,'Planche large à l\'ancienne - Série 3500',0,'',1964,1,469,163,'2017-03-22 16:43:12'),(2166,'Lamett',0,'',1965,1,272,151,'2016-03-26 10:44:05'),(2167,'Atlanta',0,'',1966,1,274,272,'2015-03-04 17:24:47'),(2168,'Cézanne',0,'',1967,1,362,272,'2016-01-27 10:27:55'),(2169,'Cuba',0,'',1968,1,364,272,'2016-01-18 17:01:24'),(2170,'Dijon',0,'',1969,1,313,272,'2016-01-27 13:14:13'),(2171,'New york',0,'',1970,1,275,272,'2014-07-02 13:23:40'),(2172,'Oslo',0,'',1971,1,276,272,'2016-01-27 14:26:50'),(2173,'Country',0,'',1972,1,277,272,'2014-07-02 13:26:51'),(2174,'Farm',0,'',1973,1,278,272,'2015-11-18 16:38:07'),(2175,'Impérial',0,'',1974,1,230,272,'2016-01-18 17:02:26'),(2176,'Nature',0,'',1975,1,282,272,'2014-07-02 13:27:21'),(2177,'Brussels',0,'',1976,1,284,272,'2017-02-15 09:14:11'),(2178,'Palace',0,'',1977,1,363,272,'2016-01-18 17:02:52'),(2179,'Royal',0,'',1978,1,371,272,'2016-01-18 17:03:06'),(2180,'Classica',0,'',1979,1,391,272,'2017-02-15 09:14:07'),(2181,'Sapphire',0,'',1980,1,392,272,'2017-02-15 09:14:00'),(2182,'Bolero',0,'',1981,1,393,272,'2017-02-15 09:13:47'),(2183,'Listone Giordano',0,'',1982,1,154,151,'2016-01-18 14:31:31'),(2184,'Linéa 70',0,'',1983,1,195,154,'2016-01-18 17:04:34'),(2185,'Piano 90',0,'',1984,1,196,154,'2016-01-18 17:04:55'),(2186,'Makita',0,'',1985,1,403,151,'2015-11-04 13:40:24'),(2187,'Objectflor',0,'',1986,1,402,151,'2015-11-02 17:45:40'),(2188,'Parqueterie Berrichonne',0,'',1987,1,153,151,'2016-01-26 16:54:20'),(2189,'Confluence 90',0,'',1988,1,211,153,'2017-03-03 16:30:22'),(2190,'Terrasse',0,'',1989,1,214,153,'2016-01-14 14:58:31'),(2191,'Nativ 11',0,'',1990,1,215,153,'2017-02-22 16:43:16'),(2192,'Class clic 140',0,'',1991,1,216,153,'2017-03-03 16:29:58'),(2193,'Confluence 140',0,'',1992,1,417,153,'2017-03-03 16:30:06'),(2194,'Confluence 170',0,'',1993,1,418,153,'2017-03-03 16:30:12'),(2195,'Confluence 190',0,'',1994,1,419,153,'2017-03-03 16:30:17'),(2196,'Nativ 14',0,'',1995,1,460,153,'2017-03-01 10:42:26'),(2197,'Quick Step',0,'',1996,1,157,151,'2016-01-18 14:32:33'),(2198,'Ambient Click',0,'',1997,1,399,157,'2017-01-24 14:15:35'),(2199,'Arte',0,'',1998,1,184,157,'2016-03-26 11:03:17'),(2200,'Balance Click',0,'',1999,1,398,157,'2015-12-14 13:51:44'),(2201,'Classic',0,'',2000,1,181,157,'2016-01-18 17:06:14'),(2202,'Creo',0,'',2001,1,309,157,'2016-01-18 17:06:24'),(2203,'Vogue',0,'',2002,1,175,157,'2015-04-07 12:47:45'),(2204,'Eligna',0,'',2003,1,177,157,'2016-01-18 17:06:36'),(2205,'Eligna Wide',0,'',2004,1,262,157,'2016-01-18 17:06:46'),(2206,'Elite',0,'',2005,1,179,157,'2016-01-18 17:06:57'),(2207,'Impressive',0,'',2006,1,304,157,'2017-04-10 14:14:08'),(2208,'Impressive Ultra',0,'',2007,1,305,157,'2017-04-10 14:13:54'),(2209,'Lagune',0,'',2008,1,180,157,'2016-01-18 17:07:29'),(2210,'Largo',0,'',2009,1,174,157,'2016-01-18 17:07:39'),(2211,'Perspective',0,'',2010,1,178,157,'2016-01-18 17:07:47'),(2212,'Perspective Wide',0,'',2011,1,310,157,'2016-01-18 17:07:58'),(2213,'Imperio',0,'',2012,1,438,157,'2016-11-16 10:56:09'),(2214,'Palazzo',0,'',2013,1,439,157,'2016-11-16 10:58:35'),(2215,'Castello',0,'',2014,1,441,157,'2016-11-16 11:04:00'),(2216,'Villa',0,'',2015,1,442,157,'2016-11-16 11:03:35'),(2217,'Compact',0,'',2016,1,444,157,'2016-11-16 11:06:42'),(2218,'Balance Click Plus',0,'',2017,1,452,157,'2017-01-23 16:58:07'),(2219,'Ambient Click Plus',0,'',2018,1,453,157,'2017-01-24 14:15:57'),(2220,'Pulse Click',0,'',2019,1,454,157,'2017-01-24 16:18:34'),(2221,'Pulse Click Plus',0,'',2020,1,455,157,'2017-01-25 10:43:20'),(2222,'Majestic',0,'',2021,1,470,157,'2017-04-10 14:17:26'),(2223,'Solidfloor',0,'',2022,1,292,151,'2016-01-18 14:32:45'),(2224,'Spax',0,'',2023,1,281,151,'2016-11-30 10:04:04'),(2225,'Verniland',0,'',2024,1,160,151,'2015-11-04 13:38:41'),(2226,'Virginia',0,'',2025,1,167,160,'2014-07-02 13:41:49'),(2227,'Callao',0,'',2026,1,169,160,'2014-07-02 13:42:00'),(2228,'Sapin brossé large',0,'',2027,1,170,160,'2014-07-02 13:42:10'),(2229,'Duo color',0,'',2028,1,173,160,'2014-07-02 13:42:23'),(2230,'Accessoires lambris',0,'',2029,1,301,160,'2014-07-25 09:30:55'),(2231,'Woca',0,'',2030,1,427,151,'2016-04-14 12:24:43'),(2232,'Box d\'entretien des parquets huilés',0,'',2031,1,432,427,'2016-03-14 17:33:10'),(2233,'Détachant',0,'',2032,1,430,427,'2016-03-14 17:27:05'),(2234,'Huile d\'entretien',0,'',2033,1,429,427,'2016-03-15 17:01:35'),(2235,'Huile d\'extérieur',0,'',2034,1,433,427,'2016-03-14 17:58:24'),(2236,'Nettoyant intensif',0,'',2035,1,431,427,'2016-03-14 17:30:25'),(2237,'Oil Care',0,'',2036,1,434,427,'2016-04-01 14:54:00'),(2238,'Savon naturel des parquets huilés',0,'',2037,1,428,427,'2016-04-01 15:38:07'),(2239,'L\'outil parfait',0,'',2038,1,446,151,'2016-11-30 10:44:20'),(2240,'Lalegno',0,'',2039,1,456,151,'2017-02-01 13:14:31'),(2241,'Fiberdeck',0,'',2040,1,458,151,'2017-02-15 10:16:05'),(2242,'Dressing',0,'',2041,1,447,3,'2016-11-30 15:52:29'),(2243,'Kendoors',0,'',2042,1,471,447,'2017-05-31 08:03:58'),(2244,'Accessoires',0,'',2043,1,457,3,'2017-02-01 14:25:08'),(2245,'LAMBOURDES & TASSEAUX',0,'',2044,1,99,457,'2017-03-21 17:03:37'),(2246,'COLLES & MASTICS',0,'',2045,1,107,457,'2017-03-21 17:03:42'),(2247,'SOUS-COUCHES',0,'',2046,1,100,457,'2017-02-01 14:26:19'),(2248,'BARRES DE SEUIL',0,'',2047,1,225,457,'2017-02-01 14:26:26'),(2249,'PLINTHES',0,'',2048,1,103,457,'2017-02-01 14:26:33'),(2250,'SOUS-PROFILÉ INCIZO',0,'',2049,1,397,457,'2017-02-01 14:27:04'),(2251,'ACCESSOIRES TERRASSES',0,'',2050,1,140,457,'2017-02-01 14:27:16'),(2252,'ACCESSOIRES LUMINAIRES',0,'',2051,1,291,457,'2017-02-01 14:27:24'),(2253,'CONTRES PLINTHES',0,'',2052,1,408,457,'2017-02-01 14:27:56'),(2254,'CHAMPLATS',0,'',2053,1,409,457,'2017-02-01 14:27:41'),(2255,'QUARTS DE ROND',0,'',2054,1,410,457,'2017-02-01 14:27:50'),(2256,'NEZ DE MARCHE',0,'',2055,1,411,457,'2017-02-01 14:28:02'),(2257,'OUTILLAGE PARQUET',0,'',2056,1,116,457,'2017-02-01 14:28:13'),(2258,'Brosses & Spalters',0,'',2057,1,467,457,'2017-03-21 16:54:05'),(2259,'Rouleaux & Montures',0,'',2058,1,468,457,'2017-03-21 17:03:14'); -/*!40000 ALTER TABLE `llx_ecommerce_category` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_element_contact` -- @@ -3985,7 +4037,7 @@ CREATE TABLE `llx_element_contact` ( KEY `fk_element_contact_fk_c_type_contact` (`fk_c_type_contact`), KEY `idx_element_contact_fk_socpeople` (`fk_socpeople`), CONSTRAINT `fk_element_contact_fk_c_type_contact` FOREIGN KEY (`fk_c_type_contact`) REFERENCES `llx_c_type_contact` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4008,13 +4060,13 @@ DROP TABLE IF EXISTS `llx_element_element`; CREATE TABLE `llx_element_element` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_source` int(11) NOT NULL, - `sourcetype` varchar(32) NOT NULL, + `sourcetype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `fk_target` int(11) NOT NULL, - `targettype` varchar(32) NOT NULL, + `targettype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, 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=14 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4027,6 +4079,33 @@ INSERT INTO `llx_element_element` VALUES (4,1,'order_supplier',20,'invoice_suppl /*!40000 ALTER TABLE `llx_element_element` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_element_lock` +-- + +DROP TABLE IF EXISTS `llx_element_lock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_lock` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_element` int(11) NOT NULL, + `elementtype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `datel` datetime DEFAULT NULL, + `datem` datetime DEFAULT NULL, + `sessionid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_lock` +-- + +LOCK TABLES `llx_element_lock` WRITE; +/*!40000 ALTER TABLE `llx_element_lock` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_element_lock` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_element_resources` -- @@ -4037,9 +4116,9 @@ DROP TABLE IF EXISTS `llx_element_resources`; CREATE TABLE `llx_element_resources` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `element_id` int(11) DEFAULT NULL, - `element_type` varchar(64) DEFAULT NULL, + `element_type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `resource_id` int(11) DEFAULT NULL, - `resource_type` varchar(64) DEFAULT NULL, + `resource_type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `busy` int(11) DEFAULT NULL, `mandatory` int(11) DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, @@ -4048,7 +4127,7 @@ CREATE TABLE `llx_element_resources` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_element_resources_idx1` (`resource_id`,`resource_type`,`element_id`,`element_type`), KEY `idx_element_element_element_id` (`element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4070,13 +4149,13 @@ DROP TABLE IF EXISTS `llx_element_tag`; CREATE TABLE `llx_element_tag` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `lang` varchar(5) NOT NULL, - `tag` varchar(255) NOT NULL, + `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL, + `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `fk_element` int(11) NOT NULL, - `element` varchar(64) NOT NULL, + `element` varchar(64) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_element_tag` (`entity`,`lang`,`tag`,`fk_element`,`element`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4088,6 +4167,70 @@ LOCK TABLES `llx_element_tag` WRITE; /*!40000 ALTER TABLE `llx_element_tag` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_emailsenderprofile` +-- + +DROP TABLE IF EXISTS `llx_emailsenderprofile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_emailsenderprofile` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `amount` double(24,8) DEFAULT NULL, + `note_public` mediumtext COLLATE utf8_unicode_ci, + `note_private` mediumtext COLLATE utf8_unicode_ci, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_user_creat` int(11) NOT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_emailsenderprofile_rowid` (`rowid`), + KEY `idx_emailsenderprofile_ref` (`ref`), + KEY `idx_emailsenderprofile_entity` (`entity`), + KEY `idx_emailsenderprofile_import_key` (`import_key`), + KEY `idx_emailsenderprofile_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_emailsenderprofile` +-- + +LOCK TABLES `llx_emailsenderprofile` WRITE; +/*!40000 ALTER TABLE `llx_emailsenderprofile` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_emailsenderprofile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_emailsenderprofile_extrafields` +-- + +DROP TABLE IF EXISTS `llx_emailsenderprofile_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_emailsenderprofile_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_emailsenderprofile_extrafields` +-- + +LOCK TABLES `llx_emailsenderprofile_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_emailsenderprofile_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_emailsenderprofile_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_entity_extrafields` -- @@ -4124,22 +4267,22 @@ CREATE TABLE `llx_entrepot` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `ref` varchar(255) DEFAULT NULL, + `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `description` text, - `lieu` varchar(64) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(10) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, + `lieu` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_departement` int(11) DEFAULT NULL, `fk_pays` int(11) DEFAULT '0', `statut` tinyint(4) DEFAULT '1', `fk_user_author` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_parent` int(11) DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_entrepot_label` (`ref`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4162,23 +4305,23 @@ DROP TABLE IF EXISTS `llx_establishment`; CREATE TABLE `llx_establishment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `name` varchar(50) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(25) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_state` int(11) DEFAULT '0', `fk_country` int(11) DEFAULT '0', - `profid1` varchar(20) DEFAULT NULL, - `profid2` varchar(20) DEFAULT NULL, - `profid3` varchar(20) DEFAULT NULL, - `phone` varchar(20) DEFAULT NULL, + `profid1` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `profid2` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `profid3` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) NOT NULL, `fk_user_mod` int(11) DEFAULT NULL, `datec` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `status` tinyint(4) DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4201,9 +4344,9 @@ CREATE TABLE `llx_event_element` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_source` int(11) NOT NULL, `fk_target` int(11) NOT NULL, - `targettype` varchar(32) NOT NULL, + `targettype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4225,17 +4368,17 @@ DROP TABLE IF EXISTS `llx_events`; CREATE TABLE `llx_events` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `type` varchar(32) NOT NULL, + `type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `dateevent` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `description` varchar(250) NOT NULL, - `ip` varchar(250) DEFAULT NULL, - `user_agent` varchar(255) DEFAULT NULL, + `description` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `ip` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, + `user_agent` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_object` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_events_dateevent` (`dateevent`) -) ENGINE=InnoDB AUTO_INCREMENT=877 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=879 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4244,7 +4387,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),(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),(741,'2016-03-13 10:54:59','USER_LOGIN',1,'2016-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL),(742,'2016-07-30 11:13:10','USER_LOGIN',1,'2016-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(743,'2016-07-30 12:50:23','USER_CREATE',1,'2016-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(744,'2016-07-30 12:50:23','USER_CREATE',1,'2016-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(745,'2016-07-30 12:50:23','USER_NEW_PASSWORD',1,'2016-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(746,'2016-07-30 12:50:38','USER_MODIFY',1,'2016-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(747,'2016-07-30 12:50:54','USER_DELETE',1,'2016-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(748,'2016-07-30 12:51:23','USER_NEW_PASSWORD',1,'2016-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(749,'2016-07-30 12:51:23','USER_MODIFY',1,'2016-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(750,'2016-07-30 18:26:58','USER_LOGIN',1,'2016-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(751,'2016-07-30 18:27:40','USER_LOGOUT',1,'2016-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(752,'2016-07-30 18:27:47','USER_LOGIN',1,'2016-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(753,'2016-07-30 19:00:00','USER_LOGOUT',1,'2016-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(754,'2016-07-30 19:00:04','USER_LOGIN',1,'2016-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(755,'2016-07-30 19:00:14','USER_LOGOUT',1,'2016-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(756,'2016-07-30 19:00:19','USER_LOGIN',1,'2016-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(757,'2016-07-30 19:00:43','USER_LOGOUT',1,'2016-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(758,'2016-07-30 19:00:48','USER_LOGIN',1,'2016-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(759,'2016-07-30 19:03:52','USER_LOGOUT',1,'2016-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(760,'2016-07-30 19:03:57','USER_LOGIN_FAILED',1,'2016-07-30 23:03:57',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/52.0.2743.82 Safari/537.36',NULL),(761,'2016-07-30 19:03:59','USER_LOGIN',1,'2016-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(762,'2016-07-30 19:04:13','USER_LOGOUT',1,'2016-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(763,'2016-07-30 19:04:17','USER_LOGIN',1,'2016-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(764,'2016-07-30 19:04:26','USER_LOGOUT',1,'2016-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(765,'2016-07-30 19:04:31','USER_LOGIN',1,'2016-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(766,'2016-07-30 19:10:50','USER_LOGOUT',1,'2016-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(767,'2016-07-30 19:10:54','USER_LOGIN',1,'2016-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(768,'2016-07-31 10:15:52','USER_LOGIN',1,'2016-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(769,'2016-07-31 10:16:27','USER_LOGIN',1,'2016-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(770,'2016-07-31 10:32:14','USER_LOGIN',1,'2016-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(771,'2016-07-31 10:36:28','USER_LOGIN',1,'2016-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(772,'2016-07-31 10:40:10','USER_LOGIN',1,'2016-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(773,'2016-07-31 10:54:16','USER_LOGIN',1,'2016-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(774,'2016-07-31 12:52:52','USER_LOGIN',1,'2016-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(775,'2016-07-31 13:25:33','USER_LOGOUT',1,'2016-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(776,'2016-07-31 13:26:32','USER_LOGIN',1,'2016-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(777,'2016-07-31 14:13:57','USER_LOGOUT',1,'2016-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(778,'2016-07-31 14:14:04','USER_LOGIN',1,'2016-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(779,'2016-07-31 16:04:35','USER_LOGIN',1,'2016-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(780,'2016-07-31 21:14:14','USER_LOGIN',1,'2016-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',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),(741,'2016-03-13 10:54:59','USER_LOGIN',1,'2016-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL),(742,'2016-07-30 11:13:10','USER_LOGIN',1,'2016-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(743,'2016-07-30 12:50:23','USER_CREATE',1,'2016-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(744,'2016-07-30 12:50:23','USER_CREATE',1,'2016-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(745,'2016-07-30 12:50:23','USER_NEW_PASSWORD',1,'2016-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(746,'2016-07-30 12:50:38','USER_MODIFY',1,'2016-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(747,'2016-07-30 12:50:54','USER_DELETE',1,'2016-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(748,'2016-07-30 12:51:23','USER_NEW_PASSWORD',1,'2016-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(749,'2016-07-30 12:51:23','USER_MODIFY',1,'2016-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(750,'2016-07-30 18:26:58','USER_LOGIN',1,'2016-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(751,'2016-07-30 18:27:40','USER_LOGOUT',1,'2016-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(752,'2016-07-30 18:27:47','USER_LOGIN',1,'2016-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(753,'2016-07-30 19:00:00','USER_LOGOUT',1,'2016-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(754,'2016-07-30 19:00:04','USER_LOGIN',1,'2016-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(755,'2016-07-30 19:00:14','USER_LOGOUT',1,'2016-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(756,'2016-07-30 19:00:19','USER_LOGIN',1,'2016-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(757,'2016-07-30 19:00:43','USER_LOGOUT',1,'2016-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(758,'2016-07-30 19:00:48','USER_LOGIN',1,'2016-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(759,'2016-07-30 19:03:52','USER_LOGOUT',1,'2016-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(760,'2016-07-30 19:03:57','USER_LOGIN_FAILED',1,'2016-07-30 23:03:57',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/52.0.2743.82 Safari/537.36',NULL),(761,'2016-07-30 19:03:59','USER_LOGIN',1,'2016-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(762,'2016-07-30 19:04:13','USER_LOGOUT',1,'2016-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(763,'2016-07-30 19:04:17','USER_LOGIN',1,'2016-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(764,'2016-07-30 19:04:26','USER_LOGOUT',1,'2016-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(765,'2016-07-30 19:04:31','USER_LOGIN',1,'2016-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(766,'2016-07-30 19:10:50','USER_LOGOUT',1,'2016-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(767,'2016-07-30 19:10:54','USER_LOGIN',1,'2016-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(768,'2016-07-31 10:15:52','USER_LOGIN',1,'2016-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(769,'2016-07-31 10:16:27','USER_LOGIN',1,'2016-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(770,'2016-07-31 10:32:14','USER_LOGIN',1,'2016-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(771,'2016-07-31 10:36:28','USER_LOGIN',1,'2016-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(772,'2016-07-31 10:40:10','USER_LOGIN',1,'2016-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(773,'2016-07-31 10:54:16','USER_LOGIN',1,'2016-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(774,'2016-07-31 12:52:52','USER_LOGIN',1,'2016-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(775,'2016-07-31 13:25:33','USER_LOGOUT',1,'2016-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(776,'2016-07-31 13:26:32','USER_LOGIN',1,'2016-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(777,'2016-07-31 14:13:57','USER_LOGOUT',1,'2016-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(778,'2016-07-31 14:14:04','USER_LOGIN',1,'2016-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(779,'2016-07-31 16:04:35','USER_LOGIN',1,'2016-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(780,'2016-07-31 21:14:14','USER_LOGIN',1,'2016-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(877,'2018-03-16 09:54:15','USER_LOGIN_FAILED',1,'2018-03-16 13:54:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL),(878,'2018-03-16 09:54:23','USER_LOGIN',1,'2018-03-16 13:54:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x936','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL); /*!40000 ALTER TABLE `llx_events` ENABLE KEYS */; UNLOCK TABLES; @@ -4258,13 +4401,13 @@ DROP TABLE IF EXISTS `llx_expedition`; CREATE TABLE `llx_expedition` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_customer` varchar(30) DEFAULT NULL, + `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(30) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -4273,7 +4416,7 @@ CREATE TABLE `llx_expedition` ( `date_delivery` datetime DEFAULT NULL, `fk_address` int(11) DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, - `tracking_number` varchar(50) DEFAULT NULL, + `tracking_number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_statut` smallint(6) DEFAULT '0', `height` float DEFAULT NULL, `height_unit` int(11) DEFAULT NULL, @@ -4282,16 +4425,16 @@ CREATE TABLE `llx_expedition` ( `size` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `billed` smallint(6) DEFAULT '0', `fk_user_modif` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_expedition_uk_ref` (`ref`,`entity`), KEY `idx_expedition_fk_soc` (`fk_soc`), @@ -4302,7 +4445,7 @@ CREATE TABLE `llx_expedition` ( CONSTRAINT `fk_expedition_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_expedition_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_expedition_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4326,10 +4469,10 @@ CREATE TABLE `llx_expedition_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_expedition_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4351,12 +4494,12 @@ DROP TABLE IF EXISTS `llx_expedition_methode`; CREATE TABLE `llx_expedition_methode` ( `rowid` int(11) NOT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `code` varchar(30) NOT NULL, - `libelle` varchar(50) NOT NULL, - `description` text, + `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, `active` tinyint(4) DEFAULT '0', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4386,7 +4529,7 @@ CREATE TABLE `llx_expeditiondet` ( PRIMARY KEY (`rowid`), KEY `idx_expeditiondet_fk_expedition` (`fk_expedition`), CONSTRAINT `fk_expeditiondet_fk_expedition` FOREIGN KEY (`fk_expedition`) REFERENCES `llx_expedition` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4411,13 +4554,13 @@ CREATE TABLE `llx_expeditiondet_batch` ( `fk_expeditiondet` int(11) NOT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, - `batch` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double NOT NULL DEFAULT '0', `fk_origin_stock` int(11) NOT NULL, PRIMARY KEY (`rowid`), KEY `idx_fk_expeditiondet` (`fk_expeditiondet`), CONSTRAINT `fk_expeditiondet_batch_fk_expeditiondet` FOREIGN KEY (`fk_expeditiondet`) REFERENCES `llx_expeditiondet` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4440,10 +4583,10 @@ CREATE TABLE `llx_expeditiondet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_expeditiondet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4464,7 +4607,7 @@ DROP TABLE IF EXISTS `llx_expensereport`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expensereport` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(50) NOT NULL, + `ref` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `ref_number_int` int(11) DEFAULT NULL, `ref_ext` int(11) DEFAULT NULL, @@ -4491,21 +4634,21 @@ CREATE TABLE `llx_expensereport` ( `fk_statut` int(11) NOT NULL, `fk_c_paiement` int(11) DEFAULT NULL, `paid` smallint(6) NOT NULL DEFAULT '0', - `note_public` text, - `note_private` text, - `detail_refuse` varchar(255) DEFAULT NULL, - `detail_cancel` varchar(255) DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci, + `detail_refuse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `detail_cancel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `integration_compta` int(11) DEFAULT NULL, `fk_bank_account` int(11) DEFAULT NULL, - `model_pdf` varchar(50) DEFAULT NULL, + `model_pdf` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_expensereport_uk_ref` (`ref`,`entity`), KEY `idx_expensereport_date_debut` (`date_debut`), @@ -4515,7 +4658,7 @@ CREATE TABLE `llx_expensereport` ( KEY `idx_expensereport_fk_user_valid` (`fk_user_valid`), KEY `idx_expensereport_fk_user_approve` (`fk_user_approve`), KEY `idx_expensereport_fk_refuse` (`fk_user_approve`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4524,7 +4667,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','2017-02-16 02:12:40',NULL,NULL,'2017-02-15 22:12:40',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,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,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2017-02-02','2017-02-02','2017-02-02 03:57:03',NULL,NULL,NULL,NULL,'2017-02-01 23:57:03',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL); +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','2017-02-16 02:12:40',NULL,NULL,'2017-02-15 22:12:40',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,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','2015-02-28 00:00:00',NULL,NULL,NULL,'2018-03-16 10:00:54',12,12,NULL,12,NULL,NULL,NULL,0,NULL,0,'Work on projet X','','',NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2017-02-02','2017-02-02','2017-02-02 03:57:03','2017-02-02 00:00:00',NULL,NULL,NULL,'2018-03-16 10:00:54',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_expensereport` ENABLE KEYS */; UNLOCK TABLES; @@ -4540,16 +4683,16 @@ CREATE TABLE `llx_expensereport_det` ( `fk_expensereport` int(11) NOT NULL, `fk_c_type_fees` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `comments` text NOT NULL, + `comments` text COLLATE utf8_unicode_ci NOT NULL, `product_type` int(11) DEFAULT '-1', `qty` double NOT NULL, `value_unit` double NOT NULL, `remise_percent` double DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) DEFAULT NULL, + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) DEFAULT NULL, + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `total_ht` double(24,8) NOT NULL DEFAULT '0.00000000', `total_tva` double(24,8) NOT NULL DEFAULT '0.00000000', `total_localtax1` double(24,8) DEFAULT '0.00000000', @@ -4559,20 +4702,20 @@ CREATE TABLE `llx_expensereport_det` ( `info_bits` int(11) DEFAULT '0', `special_code` int(11) DEFAULT '0', `rang` int(11) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', `fk_facture` int(11) DEFAULT '0', `fk_code_ventilation` int(11) DEFAULT '0', - `vat_src_code` varchar(10) DEFAULT '', - `rule_warning_message` text, + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', + `rule_warning_message` text COLLATE utf8_unicode_ci, `fk_c_exp_tax_cat` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4684,12 +4827,12 @@ DROP TABLE IF EXISTS `llx_export_compta`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_export_compta` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(12) NOT NULL, + `ref` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `date_export` datetime NOT NULL, `fk_user` int(11) NOT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4711,13 +4854,13 @@ DROP TABLE IF EXISTS `llx_export_model`; CREATE TABLE `llx_export_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL DEFAULT '0', - `label` varchar(50) NOT NULL, - `type` varchar(20) NOT NULL, - `field` text NOT NULL, - `filter` text, + `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `field` text COLLATE utf8_unicode_ci NOT NULL, + `filter` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_export_model` (`label`,`type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4738,31 +4881,31 @@ DROP TABLE IF EXISTS `llx_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `elementtype` varchar(64) NOT NULL DEFAULT 'member', - `name` varchar(64) NOT NULL, + `elementtype` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'member', + `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(255) NOT NULL, - `type` varchar(8) DEFAULT NULL, - `size` varchar(8) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, + `size` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `pos` int(11) DEFAULT '0', `alwayseditable` int(11) DEFAULT '0', - `param` text, + `param` text COLLATE utf8_unicode_ci, `fieldunique` int(11) DEFAULT '0', `fieldrequired` int(11) DEFAULT '0', - `perms` varchar(255) DEFAULT NULL, + `perms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `list` int(11) DEFAULT '1', `ishidden` int(11) DEFAULT '0', - `fieldcomputed` text, - `fielddefault` varchar(255) DEFAULT NULL, - `langs` varchar(64) DEFAULT NULL, + `fieldcomputed` text COLLATE utf8_unicode_ci, + `fielddefault` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `langs` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `enabled` varchar(255) DEFAULT '1', + `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_extrafields_name` (`name`,`entity`,`elementtype`) -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4784,13 +4927,13 @@ DROP TABLE IF EXISTS `llx_facture`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `facnumber` varchar(30) NOT NULL, + `facnumber` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` smallint(6) NOT NULL DEFAULT '0', - `ref_client` varchar(255) DEFAULT NULL, - `increment` varchar(10) DEFAULT NULL, + `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `increment` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `datef` date DEFAULT NULL, @@ -4801,8 +4944,8 @@ CREATE TABLE `llx_facture` ( `remise_percent` double DEFAULT '0', `remise_absolue` double DEFAULT '0', `remise` double DEFAULT '0', - `close_code` varchar(16) DEFAULT NULL, - `close_note` varchar(128) DEFAULT NULL, + `close_code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `close_note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `tva` double(24,8) DEFAULT '0.00000000', `localtax1` double(24,8) DEFAULT '0.00000000', `localtax2` double(24,8) DEFAULT '0.00000000', @@ -4816,29 +4959,29 @@ CREATE TABLE `llx_facture` ( `fk_facture_source` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) DEFAULT NULL, + `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) NOT NULL DEFAULT '1', `fk_mode_reglement` int(11) DEFAULT NULL, `date_lim_reglement` date DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `situation_cycle_ref` smallint(6) DEFAULT NULL, `situation_counter` smallint(6) DEFAULT NULL, `situation_final` smallint(6) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', `fk_fac_rec_source` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_facture_uk_facnumber` (`facnumber`,`entity`), KEY `idx_facture_fk_soc` (`fk_soc`), @@ -4854,7 +4997,7 @@ CREATE TABLE `llx_facture` ( CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_facture_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_facture_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4863,7 +5006,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','2016-07-10',NULL,'2016-07-30 15:13:20',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,'2016-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2011-07-18 20:33:35','2016-07-18',NULL,'2016-07-30 15:13:20',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,'2016-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2011-08-01 03:34:11','2015-08-01',NULL,'2016-07-30 15:12:32',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,'2015-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2011-08-06 20:33:53','2015-08-06',NULL,'2016-07-30 15:12:32',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,'2015-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2011-08-08 02:41:44','2015-08-08',NULL,'2016-07-30 15:12:32',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,'2015-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2011-08-08 02:55:14','2015-08-08',NULL,'2016-07-30 15:12:32',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,'2015-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 17:45:20','2015-12-08','2015-12-08','2016-07-30 15:12:32',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,'2015-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 18:20:14','2015-12-08','2015-12-08','2016-07-30 15:12:32',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,'2015-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2012-12-09 20:04:19','2015-12-09','2016-02-12','2016-07-30 15:12:32',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,'2015-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2015-12-11','2016-03-24','2016-07-30 15:12:32',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,'2015-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2015-12-11','2017-03-03','2016-07-30 15:12:32',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,'2015-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:35:51','2015-12-11','2015-12-12','2016-07-30 15:12:32',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,'2015-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,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:22:48','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:30:05','2016-01-19','2017-08-29','2017-08-29 18:39:09',0,0.00000000,NULL,NULL,0,NULL,NULL,1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,1,1,NULL,12,NULL,NULL,NULL,NULL,0,0,'2016-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:10','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:58','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:47:48','2016-07-18','2014-03-06','2016-07-30 15:13:20',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,'2016-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2013-03-20 14:30:11','2016-07-10','2018-03-20','2016-07-30 15:13:20',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,'2016-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,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2013-03-22 09:40:10','2016-03-22','2017-03-02','2017-02-06 04:11:17',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,3,'2016-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2014-03-03 19:22:03','2016-03-03','2017-03-03','2016-07-30 15:13:20',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,'2016-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2017-02-12',NULL,'2017-02-12 19:21:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2017-08-31',NULL,'2017-08-31 09:26:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2010-07-10 18:20:13','2016-07-10',NULL,'2016-07-30 15:13:20',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,'2016-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2011-07-18 20:33:35','2016-07-18',NULL,'2016-07-30 15:13:20',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,'2016-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2011-08-01 03:34:11','2015-08-01',NULL,'2016-07-30 15:12:32',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,'2015-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2011-08-06 20:33:53','2015-08-06',NULL,'2016-07-30 15:12:32',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,'2015-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2011-08-08 02:41:44','2015-08-08',NULL,'2016-07-30 15:12:32',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,'2015-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2011-08-08 02:55:14','2015-08-08',NULL,'2016-07-30 15:12:32',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,'2015-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 17:45:20','2015-12-08','2015-12-08','2016-07-30 15:12:32',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,'2015-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 18:20:14','2015-12-08','2015-12-08','2016-07-30 15:12:32',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,'2015-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2012-12-09 20:04:19','2015-12-09','2016-02-12','2016-07-30 15:12:32',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,'2015-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2015-12-11','2016-03-24','2016-07-30 15:12:32',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,'2015-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2015-12-11','2017-03-03','2016-07-30 15:12:32',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,'2015-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:35:51','2015-12-11','2015-12-12','2016-07-30 15:12:32',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,'2015-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,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:22:48','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:30:05','2016-01-19','2017-08-29','2018-03-16 09:59:31',0,0.00000000,NULL,NULL,0,NULL,NULL,1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,1,1,NULL,12,NULL,NULL,NULL,NULL,0,0,'2016-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf'),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:10','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:58','2016-01-19','2016-01-19','2016-07-30 15:13:20',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,'2016-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:47:48','2016-07-18','2014-03-06','2016-07-30 15:13:20',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,'2016-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2013-03-20 14:30:11','2016-07-10','2018-03-20','2016-07-30 15:13:20',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,'2016-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,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2013-03-22 09:40:10','2016-03-22','2017-03-02','2017-02-06 04:11:17',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,3,'2016-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2014-03-03 19:22:03','2016-03-03','2017-03-03','2016-07-30 15:13:20',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,'2016-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2017-02-12',NULL,'2017-02-12 19:21:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2017-08-31',NULL,'2017-08-31 09:26:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -4878,10 +5021,10 @@ CREATE TABLE `llx_facture_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4902,21 +5045,21 @@ DROP TABLE IF EXISTS `llx_facture_fourn`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_fourn` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(255) NOT NULL, - `ref_supplier` varchar(255) DEFAULT NULL, + `ref` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `ref_supplier` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` smallint(6) NOT NULL DEFAULT '0', `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `datef` date DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `libelle` varchar(255) DEFAULT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `paye` smallint(6) NOT NULL DEFAULT '0', `amount` double(24,8) NOT NULL DEFAULT '0.00000000', `remise` double(24,8) DEFAULT '0.00000000', - `close_code` varchar(16) DEFAULT NULL, - `close_note` varchar(128) DEFAULT NULL, + `close_code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `close_note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `tva` double(24,8) DEFAULT '0.00000000', `localtax1` double(24,8) DEFAULT '0.00000000', `localtax2` double(24,8) DEFAULT '0.00000000', @@ -4934,20 +5077,20 @@ CREATE TABLE `llx_facture_fourn` ( `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `date_lim_reglement` date DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `date_valid` date DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4962,7 +5105,7 @@ CREATE TABLE `llx_facture_fourn` ( CONSTRAINT `fk_facture_fourn_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_facture_fourn_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_facture_fourn_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4987,19 +5130,19 @@ CREATE TABLE `llx_facture_fourn_det` ( `fk_facture_fourn` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `ref` varchar(50) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `pu_ht` double(24,8) DEFAULT NULL, `pu_ttc` double(24,8) DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `total_ht` double(24,8) DEFAULT NULL, `tva` double(24,8) DEFAULT NULL, `total_localtax1` double(24,8) DEFAULT '0.00000000', @@ -5009,13 +5152,13 @@ CREATE TABLE `llx_facture_fourn_det` ( `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, `info_bits` int(11) NOT NULL DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', `special_code` int(11) DEFAULT '0', `rang` int(11) DEFAULT '0', `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -5027,7 +5170,7 @@ CREATE TABLE `llx_facture_fourn_det` ( KEY `idx_facture_fourn_det_fk_product` (`fk_product`), CONSTRAINT `fk_facture_fourn_det_fk_facture` FOREIGN KEY (`fk_facture_fourn`) REFERENCES `llx_facture_fourn` (`rowid`), CONSTRAINT `fk_facture_fourn_det_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5051,10 +5194,10 @@ CREATE TABLE `llx_facture_fourn_det_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_det_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5077,10 +5220,10 @@ CREATE TABLE `llx_facture_fourn_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5101,7 +5244,7 @@ DROP TABLE IF EXISTS `llx_facture_rec`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `titre` varchar(100) DEFAULT NULL, + `titre` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, @@ -5119,11 +5262,11 @@ CREATE TABLE `llx_facture_rec` ( `fk_cond_reglement` int(11) DEFAULT '0', `fk_mode_reglement` int(11) DEFAULT '0', `date_lim_reglement` date DEFAULT NULL, - `note_private` text, - `note_public` text, - `modelpdf` varchar(255) DEFAULT NULL, - `last_gen` varchar(7) DEFAULT NULL, - `unit_frequency` varchar(2) DEFAULT 'd', + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `modelpdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_gen` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL, + `unit_frequency` varchar(2) COLLATE utf8_unicode_ci DEFAULT 'd', `date_when` datetime DEFAULT NULL, `date_last_gen` datetime DEFAULT NULL, `nb_gen_done` int(11) DEFAULT NULL, @@ -5135,14 +5278,14 @@ CREATE TABLE `llx_facture_rec` ( `generate_pdf` int(11) DEFAULT '1', `fk_account` int(11) DEFAULT '0', `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', `fk_user_modif` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `suspended` int(11) DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `idx_facture_rec_uk_titre` (`titre`,`entity`), @@ -5152,7 +5295,7 @@ CREATE TABLE `llx_facture_rec` ( CONSTRAINT `fk_facture_rec_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), CONSTRAINT `fk_facture_rec_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_facture_rec_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5203,14 +5346,14 @@ CREATE TABLE `llx_facturedet` ( `fk_facture` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -5232,14 +5375,14 @@ CREATE TABLE `llx_facturedet` ( `special_code` int(10) unsigned DEFAULT '0', `rang` int(11) DEFAULT '0', `fk_contract_line` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `situation_percent` double DEFAULT NULL, `fk_prev_id` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -5252,7 +5395,7 @@ CREATE TABLE `llx_facturedet` ( KEY `idx_facturedet_fk_code_ventilation` (`fk_code_ventilation`), CONSTRAINT `fk_facturedet_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), CONSTRAINT `fk_facturedet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=1031 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=1031 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5276,10 +5419,10 @@ CREATE TABLE `llx_facturedet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facturedet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5304,14 +5447,14 @@ CREATE TABLE `llx_facturedet_rec` ( `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `product_type` int(11) DEFAULT '0', - `label` varchar(255) DEFAULT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -5327,9 +5470,9 @@ CREATE TABLE `llx_facturedet_rec` ( `rang` int(11) DEFAULT '0', `fk_contract_line` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -5337,7 +5480,7 @@ CREATE TABLE `llx_facturedet_rec` ( PRIMARY KEY (`rowid`), KEY `fk_facturedet_rec_fk_unit` (`fk_unit`), CONSTRAINT `fk_facturedet_rec_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5388,7 +5531,7 @@ CREATE TABLE `llx_fichinter` ( `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT '0', `fk_contrat` int(11) DEFAULT '0', - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, @@ -5402,19 +5545,19 @@ CREATE TABLE `llx_fichinter` ( `dateo` date DEFAULT NULL, `datee` date DEFAULT NULL, `datet` date DEFAULT NULL, - `description` text, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, - `ref_ext` varchar(255) DEFAULT NULL, - `last_main_doc` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), 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=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5438,10 +5581,10 @@ CREATE TABLE `llx_fichinter_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ficheinter_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5465,13 +5608,13 @@ CREATE TABLE `llx_fichinterdet` ( `fk_fichinter` int(11) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `date` datetime DEFAULT NULL, - `description` text, + `description` text COLLATE utf8_unicode_ci, `duree` int(11) DEFAULT NULL, `rang` int(11) DEFAULT '0', 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=7 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5495,10 +5638,10 @@ CREATE TABLE `llx_fichinterdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ficheinterdet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5521,7 +5664,7 @@ CREATE TABLE `llx_holiday` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL, `date_create` datetime NOT NULL, - `description` varchar(255) NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `date_debut` date NOT NULL, `date_fin` date NOT NULL, `halfday` int(11) DEFAULT '0', @@ -5533,18 +5676,18 @@ CREATE TABLE `llx_holiday` ( `fk_user_refuse` int(11) DEFAULT NULL, `date_cancel` datetime DEFAULT NULL, `fk_user_cancel` int(11) DEFAULT NULL, - `detail_refuse` varchar(250) DEFAULT NULL, - `note_private` text, - `note_public` text, - `note` text, + `detail_refuse` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci, `fk_user_create` int(11) DEFAULT NULL, `fk_type` int(11) NOT NULL DEFAULT '1', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `entity` int(11) NOT NULL DEFAULT '1', - `ref` varchar(30) DEFAULT NULL, - `ref_ext` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_holiday_fk_user` (`fk_user`), @@ -5554,7 +5697,7 @@ CREATE TABLE `llx_holiday` ( KEY `idx_holiday_date_create` (`date_create`), KEY `idx_holiday_fk_validator` (`fk_validator`), KEY `idx_holiday_entity` (`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5576,12 +5719,12 @@ DROP TABLE IF EXISTS `llx_holiday_config`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_holiday_config` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(128) DEFAULT NULL, - `value` text, + `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `value` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `name` (`name`), UNIQUE KEY `idx_holiday_config` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5606,12 +5749,12 @@ CREATE TABLE `llx_holiday_logs` ( `date_action` datetime NOT NULL, `fk_user_action` int(11) NOT NULL, `fk_user_update` int(11) NOT NULL, - `type_action` varchar(255) NOT NULL, - `prev_solde` varchar(255) NOT NULL, - `new_solde` varchar(255) NOT NULL, + `type_action` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `prev_solde` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `new_solde` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `fk_type` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5636,7 +5779,7 @@ CREATE TABLE `llx_holiday_users` ( `nb_holiday` double NOT NULL DEFAULT '0', `fk_type` int(11) NOT NULL DEFAULT '1', UNIQUE KEY `uk_holiday_users` (`fk_user`,`fk_type`,`nb_holiday`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5659,12 +5802,12 @@ DROP TABLE IF EXISTS `llx_import_model`; CREATE TABLE `llx_import_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL DEFAULT '0', - `label` varchar(50) NOT NULL, - `type` varchar(50) DEFAULT NULL, - `field` text NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `field` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_import_model` (`label`,`type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5794,13 +5937,13 @@ CREATE TABLE `llx_links` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', `datea` datetime NOT NULL, - `url` varchar(255) NOT NULL, - `label` varchar(255) NOT NULL, - `objecttype` varchar(255) NOT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `objecttype` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `objectid` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_links` (`objectid`,`label`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5823,12 +5966,12 @@ DROP TABLE IF EXISTS `llx_livraison`; CREATE TABLE `llx_livraison` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_customer` varchar(30) DEFAULT NULL, + `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(30) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -5837,14 +5980,14 @@ CREATE TABLE `llx_livraison` ( `fk_address` int(11) DEFAULT NULL, `fk_statut` smallint(6) DEFAULT '0', `total_ht` double(24,8) DEFAULT '0.00000000', - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, - `last_main_doc` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_livraison_uk_ref` (`ref`,`entity`), KEY `idx_livraison_fk_soc` (`fk_soc`), @@ -5853,7 +5996,7 @@ CREATE TABLE `llx_livraison` ( CONSTRAINT `fk_livraison_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_livraison_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_livraison_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5876,10 +6019,10 @@ CREATE TABLE `llx_livraison_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_livraison_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5903,7 +6046,7 @@ CREATE TABLE `llx_livraisondet` ( `fk_livraison` int(11) DEFAULT NULL, `fk_origin_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `description` text, + `description` text COLLATE utf8_unicode_ci, `qty` double DEFAULT NULL, `subprice` double(24,8) DEFAULT '0.00000000', `total_ht` double(24,8) DEFAULT '0.00000000', @@ -5911,7 +6054,7 @@ CREATE TABLE `llx_livraisondet` ( PRIMARY KEY (`rowid`), KEY `idx_livraisondet_fk_expedition` (`fk_livraison`), CONSTRAINT `fk_livraisondet_fk_livraison` FOREIGN KEY (`fk_livraison`) REFERENCES `llx_livraison` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5934,10 +6077,10 @@ CREATE TABLE `llx_livraisondet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_livraisondet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5961,27 +6104,27 @@ CREATE TABLE `llx_loan` ( `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(80) NOT NULL, + `label` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `fk_bank` int(11) DEFAULT NULL, `capital` double(24,8) DEFAULT NULL, `datestart` date DEFAULT NULL, `dateend` date DEFAULT NULL, `nbterm` double DEFAULT NULL, `rate` double NOT NULL, - `note_private` text, - `note_public` text, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, `capital_position` double(24,8) DEFAULT NULL, `date_position` date DEFAULT NULL, `paid` smallint(6) NOT NULL DEFAULT '0', - `accountancy_account_capital` varchar(32) DEFAULT NULL, - `accountancy_account_insurance` varchar(32) DEFAULT NULL, - `accountancy_account_interest` varchar(32) DEFAULT NULL, + `accountancy_account_capital` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_account_insurance` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_account_interest` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `fk_projet` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6044,13 +6187,13 @@ CREATE TABLE `llx_localtax` ( `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `amount` double NOT NULL DEFAULT '0', - `label` varchar(255) DEFAULT NULL, - `note` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6072,18 +6215,18 @@ DROP TABLE IF EXISTS `llx_mailing`; CREATE TABLE `llx_mailing` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `statut` smallint(6) DEFAULT '0', - `titre` varchar(128) DEFAULT NULL, + `titre` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `sujet` varchar(128) DEFAULT NULL, - `body` mediumtext, - `bgcolor` varchar(8) DEFAULT NULL, - `bgimage` varchar(255) DEFAULT NULL, - `cible` varchar(60) DEFAULT NULL, + `sujet` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `body` mediumtext COLLATE utf8_unicode_ci, + `bgcolor` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, + `bgimage` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cible` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `nbemail` int(11) DEFAULT NULL, - `email_from` varchar(160) DEFAULT NULL, - `email_replyto` varchar(160) DEFAULT NULL, - `email_errorsto` varchar(160) DEFAULT NULL, - `tag` varchar(128) DEFAULT NULL, + `email_from` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_replyto` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_errorsto` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, + `tag` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creat` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_appro` datetime DEFAULT NULL, @@ -6091,13 +6234,13 @@ CREATE TABLE `llx_mailing` ( `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `fk_user_appro` int(11) DEFAULT NULL, - `joined_file1` varchar(255) DEFAULT NULL, - `joined_file2` varchar(255) DEFAULT NULL, - `joined_file3` varchar(255) DEFAULT NULL, - `joined_file4` varchar(255) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `joined_file1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `joined_file2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `joined_file3` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `joined_file4` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6121,21 +6264,21 @@ CREATE TABLE `llx_mailing_cibles` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_mailing` int(11) NOT NULL, `fk_contact` int(11) NOT NULL, - `lastname` varchar(50) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `email` varchar(160) NOT NULL, - `other` varchar(255) DEFAULT NULL, - `tag` varchar(128) DEFAULT NULL, + `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(160) COLLATE utf8_unicode_ci NOT NULL, + `other` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `tag` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT '0', - `source_url` varchar(255) DEFAULT NULL, + `source_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `source_id` int(11) DEFAULT NULL, - `source_type` varchar(16) DEFAULT NULL, + `source_type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `date_envoi` datetime DEFAULT NULL, - `error_text` varchar(255) DEFAULT NULL, + `error_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing_cibles` (`fk_mailing`,`email`), KEY `idx_mailing_cibles_email` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6157,29 +6300,29 @@ DROP TABLE IF EXISTS `llx_menu`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_menu` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `menu_handler` varchar(16) NOT NULL, + `menu_handler` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `module` varchar(64) DEFAULT NULL, - `type` varchar(4) NOT NULL, - `mainmenu` varchar(100) NOT NULL, + `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `type` varchar(4) COLLATE utf8_unicode_ci NOT NULL, + `mainmenu` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `fk_menu` int(11) NOT NULL, - `fk_leftmenu` varchar(100) DEFAULT NULL, - `fk_mainmenu` varchar(100) DEFAULT NULL, + `fk_leftmenu` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_mainmenu` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL, - `url` varchar(255) NOT NULL, - `target` varchar(100) DEFAULT NULL, - `titre` varchar(255) NOT NULL, - `langs` varchar(100) DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `target` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `titre` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `langs` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `level` smallint(6) DEFAULT NULL, - `leftmenu` varchar(100) DEFAULT NULL, - `perms` text, - `enabled` varchar(255) DEFAULT '1', + `leftmenu` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `perms` text COLLATE utf8_unicode_ci, + `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', `usertype` int(11) NOT NULL DEFAULT '0', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 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=166468 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=166493 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6188,7 +6331,7 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (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'),(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'),(145086,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145087,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145088,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145089,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145090,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145091,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/add.php','','MenuResourceAdd','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145092,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'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,'2017-08-30 15:14:30'),(161090,'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,'2017-08-30 15:14:30'),(161092,'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->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','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->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$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',2,'2017-08-30 15:14:30'),(161094,'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,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','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 || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'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,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,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) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,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) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,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,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,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,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,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,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,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,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,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,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,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,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,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,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,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,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,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,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,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,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,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',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,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,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166442,'all',1,'agenda','top','agenda',0,NULL,NULL,15,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166443,'all',1,'agenda','left','agenda',166442,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166444,'all',1,'agenda','left','agenda',166443,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,'2018-01-19 11:17:54'),(166445,'all',1,'agenda','left','agenda',166443,NULL,NULL,140,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166446,'all',1,'agenda','left','agenda',166445,NULL,NULL,141,'/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,'2018-01-19 11:17:54'),(166447,'all',1,'agenda','left','agenda',166445,NULL,NULL,142,'/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,'2018-01-19 11:17:54'),(166448,'all',1,'agenda','left','agenda',166445,NULL,NULL,143,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-01-19 11:17:54'),(166449,'all',1,'agenda','left','agenda',166445,NULL,NULL,144,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-01-19 11:17:54'),(166450,'all',1,'agenda','left','agenda',166443,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166451,'all',1,'agenda','left','agenda',166450,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166452,'all',1,'agenda','left','agenda',166450,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166453,'all',1,'agenda','left','agenda',166450,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-01-19 11:17:54'),(166454,'all',1,'agenda','left','agenda',166450,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-01-19 11:17:54'),(166455,'all',1,'agenda','left','agenda',166443,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2018-01-19 11:17:54'),(166456,'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,'2018-01-19 11:17:54'),(166457,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^admintools/\',$leftmenu)',0,'2018-01-19 11:17:54'),(166458,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?status=-2&leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^admintools/\', $leftmenu)',2,'2018-01-19 11:17:54'),(166459,'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,'2018-01-19 11:17:54'),(166460,'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,'2018-01-19 11:17:54'),(166461,'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,'2018-01-19 11:17:54'),(166462,'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) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2018-01-19 11:17:54'),(166463,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2018-01-19 11:17:54'),(166464,'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,'2018-01-19 11:17:54'),(166465,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2018-01-19 11:17:54'),(166466,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2018-01-19 11:27:15'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'); +INSERT INTO `llx_menu` VALUES (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'),(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'),(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'),(145086,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145087,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145088,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145089,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2016-07-30 11:13:20'),(145090,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145091,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/add.php','','MenuResourceAdd','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145092,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2016-07-30 11:13:32'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'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,'2017-08-30 15:14:30'),(161090,'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,'2017-08-30 15:14:30'),(161092,'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->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','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->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$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',2,'2017-08-30 15:14:30'),(161094,'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,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','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 || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'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,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,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) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,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) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,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,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,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,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,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,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,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,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,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,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,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,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,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,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,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,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,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,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,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,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,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,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,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',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,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 && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,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,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166468,'all',1,'agenda','top','agenda',0,NULL,NULL,15,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166469,'all',1,'agenda','left','agenda',166468,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166470,'all',1,'agenda','left','agenda',166469,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,'2018-03-16 09:54:05'),(166471,'all',1,'agenda','left','agenda',166469,NULL,NULL,140,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166472,'all',1,'agenda','left','agenda',166471,NULL,NULL,141,'/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,'2018-03-16 09:54:05'),(166473,'all',1,'agenda','left','agenda',166471,NULL,NULL,142,'/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,'2018-03-16 09:54:05'),(166474,'all',1,'agenda','left','agenda',166471,NULL,NULL,143,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-03-16 09:54:05'),(166475,'all',1,'agenda','left','agenda',166471,NULL,NULL,144,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-03-16 09:54:05'),(166476,'all',1,'agenda','left','agenda',166469,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166477,'all',1,'agenda','left','agenda',166476,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166478,'all',1,'agenda','left','agenda',166476,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166479,'all',1,'agenda','left','agenda',166476,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-03-16 09:54:05'),(166480,'all',1,'agenda','left','agenda',166476,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2018-03-16 09:54:05'),(166481,'all',1,'agenda','left','agenda',166469,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2018-03-16 09:54:05'),(166482,'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,'2018-03-16 09:54:05'),(166483,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^admintools/\',$leftmenu)',0,'2018-03-16 09:54:05'),(166484,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?status=-2&leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^admintools/\', $leftmenu)',2,'2018-03-16 09:54:05'),(166485,'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,'2018-03-16 09:54:05'),(166486,'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,'2018-03-16 09:54:05'),(166487,'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,'2018-03-16 09:54:05'),(166488,'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) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2018-03-16 09:54:05'),(166489,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2018-03-16 09:54:05'),(166490,'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,'2018-03-16 09:54:05'),(166491,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2018-03-16 09:54:05'),(166492,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2018-03-16 09:57:24'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; @@ -6202,12 +6345,12 @@ DROP TABLE IF EXISTS `llx_multicurrency`; CREATE TABLE `llx_multicurrency` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `date_create` datetime DEFAULT NULL, - `code` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, + `code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT '1', `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6234,7 +6377,7 @@ CREATE TABLE `llx_multicurrency_rate` ( `fk_multicurrency` int(11) NOT NULL, `entity` int(11) DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6262,13 +6405,13 @@ CREATE TABLE `llx_notify` ( `fk_soc` int(11) DEFAULT NULL, `fk_contact` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `objet_type` varchar(24) NOT NULL, + `objet_type` varchar(24) COLLATE utf8_unicode_ci NOT NULL, `objet_id` int(11) NOT NULL, - `email` varchar(255) DEFAULT NULL, - `type` varchar(16) DEFAULT 'email', - `type_target` varchar(16) DEFAULT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `type` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'email', + `type_target` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6295,9 +6438,9 @@ CREATE TABLE `llx_notify_def` ( `fk_soc` int(11) DEFAULT NULL, `fk_contact` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `type` varchar(16) DEFAULT 'email', + `type` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'email', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6347,13 +6490,13 @@ DROP TABLE IF EXISTS `llx_oauth_state`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_oauth_state` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `service` varchar(36) DEFAULT NULL, - `state` varchar(128) DEFAULT NULL, + `service` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL, + `state` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6374,13 +6517,13 @@ DROP TABLE IF EXISTS `llx_oauth_token`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_oauth_token` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `service` varchar(36) DEFAULT NULL, - `token` text, + `service` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL, + `token` text COLLATE utf8_unicode_ci, `fk_user` int(11) DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6431,13 +6574,13 @@ DROP TABLE IF EXISTS `llx_opensurvey_comments`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_opensurvey_comments` ( `id_comment` int(10) unsigned NOT NULL AUTO_INCREMENT, - `id_sondage` char(16) NOT NULL, - `comment` text NOT NULL, - `usercomment` text, + `id_sondage` char(16) COLLATE utf8_unicode_ci NOT NULL, + `comment` text COLLATE utf8_unicode_ci NOT NULL, + `usercomment` text COLLATE utf8_unicode_ci, PRIMARY KEY (`id_comment`), KEY `idx_id_comment` (`id_comment`), KEY `idx_id_sondage` (`id_sondage`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6459,11 +6602,11 @@ DROP TABLE IF EXISTS `llx_opensurvey_formquestions`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_opensurvey_formquestions` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `id_sondage` varchar(16) DEFAULT NULL, - `question` text, - `available_answers` text, + `id_sondage` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `question` text COLLATE utf8_unicode_ci, + `available_answers` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6483,24 +6626,24 @@ DROP TABLE IF EXISTS `llx_opensurvey_sondage`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_opensurvey_sondage` ( - `id_sondage` varchar(16) NOT NULL, - `commentaires` text, - `mail_admin` varchar(128) DEFAULT NULL, - `nom_admin` varchar(64) DEFAULT NULL, + `id_sondage` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `commentaires` text COLLATE utf8_unicode_ci, + `mail_admin` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `nom_admin` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, - `titre` text NOT NULL, + `titre` text COLLATE utf8_unicode_ci NOT NULL, `date_fin` datetime DEFAULT NULL, `status` int(11) DEFAULT '1', - `format` varchar(2) NOT NULL, + `format` varchar(2) COLLATE utf8_unicode_ci NOT NULL, `mailsonde` tinyint(4) NOT NULL DEFAULT '0', `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `entity` int(11) NOT NULL DEFAULT '1', `allow_comments` tinyint(4) NOT NULL DEFAULT '1', `allow_spy` tinyint(4) NOT NULL DEFAULT '1', - `sujet` text, + `sujet` text COLLATE utf8_unicode_ci, PRIMARY KEY (`id_sondage`), KEY `idx_date_fin` (`date_fin`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6509,7 +6652,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','What is your prefered date for a brunch','myemail@aaa.com','fdfds',0,'Date of next brunch','2013-03-07 00:00:00',1,'D',1,'2017-02-20 16:47:22',1,1,1,',1483473600'),('tim1dye8x5eeetxu','Please vote for the candidate you want to have for our new president this year.',NULL,NULL,12,'Election of new president','2017-02-26 04:00:00',1,'A',0,'2017-02-20 16:53:37',1,1,0,'Alan Candide@foragainst,Alex Candor@foragainst'); +INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','What is your prefered date for a brunch','myemail@aaa.com','fdfds',0,'Date of next brunch','2013-03-07 00:00:00',1,'D',1,'2018-03-16 10:00:54',1,1,1,',1483473600'),('tim1dye8x5eeetxu','Please vote for the candidate you want to have for our new president this year.',NULL,NULL,12,'Election of new president','2017-02-26 04:00:00',1,'A',0,'2018-03-16 10:00:54',1,1,0,'Alan Candide@foragainst,Alex Candor@foragainst'); /*!40000 ALTER TABLE `llx_opensurvey_sondage` ENABLE KEYS */; UNLOCK TABLES; @@ -6523,8 +6666,8 @@ DROP TABLE IF EXISTS `llx_opensurvey_user_formanswers`; CREATE TABLE `llx_opensurvey_user_formanswers` ( `fk_user_survey` int(11) NOT NULL, `fk_question` int(11) NOT NULL, - `reponses` text -) ENGINE=InnoDB DEFAULT CHARSET=utf8; + `reponses` text COLLATE utf8_unicode_ci +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6545,9 +6688,9 @@ DROP TABLE IF EXISTS `llx_opensurvey_user_studs`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_opensurvey_user_studs` ( `id_users` int(11) NOT NULL AUTO_INCREMENT, - `nom` varchar(64) NOT NULL, - `id_sondage` varchar(16) NOT NULL, - `reponses` varchar(100) NOT NULL, + `nom` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `id_sondage` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `reponses` varchar(100) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id_users`), KEY `idx_id_users` (`id_users`), KEY `idx_nom` (`nom`), @@ -6555,7 +6698,7 @@ CREATE TABLE `llx_opensurvey_user_studs` ( KEY `idx_opensurvey_user_studs_id_users` (`id_users`), KEY `idx_opensurvey_user_studs_nom` (`nom`), KEY `idx_opensurvey_user_studs_id_sondage` (`id_sondage`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6578,12 +6721,12 @@ DROP TABLE IF EXISTS `llx_overwrite_trans`; CREATE TABLE `llx_overwrite_trans` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `lang` varchar(5) DEFAULT NULL, - `transkey` varchar(128) DEFAULT NULL, - `transvalue` text, + `lang` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `transkey` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `transvalue` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_overwrite_trans` (`lang`,`transkey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6604,15 +6747,15 @@ DROP TABLE IF EXISTS `llx_paiement`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_paiement` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) NOT NULL DEFAULT '', + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_paiement` int(11) NOT NULL, - `num_paiement` varchar(50) DEFAULT NULL, - `note` text, + `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL DEFAULT '0', `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -6620,7 +6763,7 @@ CREATE TABLE `llx_paiement` ( `fk_export_compta` int(11) NOT NULL DEFAULT '0', `multicurrency_amount` double(24,8) DEFAULT '0.00000000', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6629,7 +6772,7 @@ CREATE TABLE `llx_paiement` ( LOCK TABLES `llx_paiement` WRITE; /*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; -INSERT INTO `llx_paiement` VALUES (2,'',1,'2011-07-18 20:50:24','2016-07-30 15:13:20','2016-07-08 12:00:00',20.00000000,6,'','',5,1,NULL,0,0,0.00000000),(3,'',1,'2011-07-18 20:50:47','2016-07-30 15:13:20','2016-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000),(5,'',1,'2011-08-01 03:34:11','2016-07-30 15:12:32','2015-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000),(6,'',1,'2011-08-06 20:33:54','2016-07-30 15:12:32','2015-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000),(8,'',1,'2011-08-08 02:53:40','2016-07-30 15:12:32','2015-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000),(9,'',1,'2011-08-08 02:55:58','2016-07-30 15:12:32','2015-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000),(17,'',1,'2012-12-09 15:28:44','2016-07-30 15:12:32','2015-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000),(18,'',1,'2012-12-09 15:28:53','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000),(19,'',1,'2012-12-09 17:35:55','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000),(20,'',1,'2012-12-09 17:37:02','2016-07-30 15:12:32','2015-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000),(21,'',1,'2012-12-09 18:35:07','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000),(23,'',1,'2012-12-12 18:54:33','2016-07-30 15:12:32','2015-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000),(24,'',1,'2013-03-06 16:48:16','2016-07-30 15:13:20','2016-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000),(25,'',1,'2013-03-20 14:30:11','2016-07-30 15:13:20','2016-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000),(26,'',1,'2014-03-02 19:57:58','2016-07-30 15:13:20','2016-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000),(29,'',1,'2014-03-02 20:01:39','2016-07-30 15:13:20','2016-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000),(30,'',1,'2014-03-02 20:02:06','2016-07-30 15:13:20','2016-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000),(32,'',1,'2014-03-03 19:22:32','2016-07-30 15:12:32','2015-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000),(33,'',1,'2014-03-03 19:23:16','2016-07-30 15:13:20','2016-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2017-02-06 04:10:24','2016-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2017-02-06 04:10:50','2016-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000); +INSERT INTO `llx_paiement` VALUES (2,'',1,'2011-07-18 20:50:24','2016-07-30 15:13:20','2016-07-08 12:00:00',20.00000000,6,'','',5,1,NULL,0,0,0.00000000),(3,'',1,'2011-07-18 20:50:47','2016-07-30 15:13:20','2016-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000),(5,'',1,'2011-08-01 03:34:11','2016-07-30 15:12:32','2015-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000),(6,'',1,'2011-08-06 20:33:54','2016-07-30 15:12:32','2015-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000),(8,'',1,'2011-08-08 02:53:40','2016-07-30 15:12:32','2015-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000),(9,'',1,'2011-08-08 02:55:58','2016-07-30 15:12:32','2015-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000),(17,'',1,'2012-12-09 15:28:44','2016-07-30 15:12:32','2015-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000),(18,'',1,'2012-12-09 15:28:53','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000),(19,'',1,'2012-12-09 17:35:55','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000),(20,'',1,'2012-12-09 17:37:02','2016-07-30 15:12:32','2015-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000),(21,'',1,'2012-12-09 18:35:07','2016-07-30 15:12:32','2015-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000),(23,'',1,'2012-12-12 18:54:33','2016-07-30 15:12:32','2015-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000),(24,'',1,'2013-03-06 16:48:16','2016-07-30 15:13:20','2016-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000),(25,'',1,'2013-03-20 14:30:11','2016-07-30 15:13:20','2016-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000),(26,'',1,'2014-03-02 19:57:58','2016-07-30 15:13:20','2016-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000),(29,'',1,'2014-03-02 20:01:39','2016-07-30 15:13:20','2016-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000),(30,'',1,'2014-03-02 20:02:06','2016-07-30 15:13:20','2016-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000),(32,'',1,'2014-03-03 19:22:32','2016-07-30 15:12:32','2015-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000),(33,'',1,'2014-03-03 19:23:16','2016-07-30 15:13:20','2016-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2017-02-06 04:10:24','2016-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2017-02-06 04:10:50','2016-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000),(38,'PAY1803-0004',1,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,10.00000000); /*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -6652,7 +6795,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=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6661,7 +6804,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,0.00000000),(3,3,2,10.00000000,0.00000000),(5,5,5,5.63000000,0.00000000),(6,6,6,5.98000000,0.00000000),(9,8,2,16.10000000,0.00000000),(10,8,8,10.00000000,0.00000000),(11,9,3,15.00000000,0.00000000),(12,9,9,11.96000000,0.00000000),(24,20,9,1.00000000,0.00000000),(31,26,32,600.00000000,0.00000000),(36,29,32,500.00000000,0.00000000),(37,30,32,400.00000000,0.00000000),(38,34,211,150.00000000,150.00000000),(39,35,211,140.00000000,140.00000000),(40,36,211,50.00000000,50.00000000); +INSERT INTO `llx_paiement_facture` VALUES (2,2,2,20.00000000,0.00000000),(3,3,2,10.00000000,0.00000000),(5,5,5,5.63000000,0.00000000),(6,6,6,5.98000000,0.00000000),(9,8,2,16.10000000,0.00000000),(10,8,8,10.00000000,0.00000000),(11,9,3,15.00000000,0.00000000),(12,9,9,11.96000000,0.00000000),(24,20,9,1.00000000,0.00000000),(31,26,32,600.00000000,0.00000000),(36,29,32,500.00000000,0.00000000),(37,30,32,400.00000000,0.00000000),(38,34,211,150.00000000,150.00000000),(39,35,211,140.00000000,140.00000000),(40,36,211,50.00000000,50.00000000),(42,38,149,10.00000000,10.00000000); /*!40000 ALTER TABLE `llx_paiement_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -6680,13 +6823,13 @@ CREATE TABLE `llx_paiementcharge` ( `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepaiement` int(11) NOT NULL, - `num_paiement` varchar(50) DEFAULT NULL, - `note` text, + `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6708,7 +6851,7 @@ DROP TABLE IF EXISTS `llx_paiementfourn`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_paiementfourn` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) DEFAULT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, @@ -6716,14 +6859,14 @@ CREATE TABLE `llx_paiementfourn` ( `amount` double(24,8) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_paiement` int(11) NOT NULL, - `num_paiement` varchar(50) DEFAULT NULL, - `note` text, + `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL, `statut` smallint(6) NOT NULL DEFAULT '0', `multicurrency_amount` double(24,8) DEFAULT '0.00000000', - `model_pdf` varchar(255) DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6753,7 +6896,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 AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6781,13 +6924,13 @@ CREATE TABLE `llx_payment_donation` ( `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) DEFAULT NULL, - `note` text, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6815,13 +6958,13 @@ CREATE TABLE `llx_payment_expensereport` ( `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) DEFAULT NULL, - `note` text, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6851,14 +6994,14 @@ CREATE TABLE `llx_payment_loan` ( `amount_insurance` double(24,8) DEFAULT NULL, `amount_interest` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) DEFAULT NULL, - `note_private` text, - `note_public` text, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6887,12 +7030,12 @@ CREATE TABLE `llx_payment_salary` ( `salary` double(24,8) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `datesp` date DEFAULT NULL, `dateep` date DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `note` text, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -6903,7 +7046,7 @@ CREATE TABLE `llx_payment_salary` ( KEY `idx_payment_salary_datesp` (`datesp`), KEY `idx_payment_salary_dateep` (`dateep`), CONSTRAINT `fk_payment_salary_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6963,13 +7106,13 @@ DROP TABLE IF EXISTS `llx_prelevement_bons`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_prelevement_bons` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(12) DEFAULT NULL, + `ref` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `statut` smallint(6) DEFAULT '0', `credite` smallint(6) DEFAULT '0', - `note` text, + `note` text COLLATE utf8_unicode_ci, `date_trans` datetime DEFAULT NULL, `method_trans` smallint(6) DEFAULT NULL, `fk_user_trans` int(11) DEFAULT NULL, @@ -6977,7 +7120,7 @@ CREATE TABLE `llx_prelevement_bons` ( `fk_user_credit` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_prelevement_bons_ref` (`ref`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7004,7 +7147,7 @@ CREATE TABLE `llx_prelevement_facture` ( PRIMARY KEY (`rowid`), KEY `idx_prelevement_facture_fk_prelevement_lignes` (`fk_prelevement_lignes`), CONSTRAINT `fk_prelevement_facture_fk_prelevement_lignes` FOREIGN KEY (`fk_prelevement_lignes`) REFERENCES `llx_prelevement_lignes` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7033,12 +7176,12 @@ CREATE TABLE `llx_prelevement_facture_demande` ( `date_traite` datetime DEFAULT NULL, `fk_prelevement_bons` int(11) DEFAULT NULL, `fk_user_demande` int(11) NOT NULL, - `code_banque` varchar(128) DEFAULT NULL, - `code_guichet` varchar(6) DEFAULT NULL, - `number` varchar(255) DEFAULT NULL, - `cle_rib` varchar(5) DEFAULT NULL, + `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7063,17 +7206,17 @@ CREATE TABLE `llx_prelevement_lignes` ( `fk_prelevement_bons` int(11) DEFAULT NULL, `fk_soc` int(11) NOT NULL, `statut` smallint(6) DEFAULT '0', - `client_nom` varchar(255) DEFAULT NULL, + `client_nom` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `code_banque` varchar(128) DEFAULT NULL, - `code_guichet` varchar(6) DEFAULT NULL, - `number` varchar(255) DEFAULT NULL, - `cle_rib` varchar(5) DEFAULT NULL, - `note` text, + `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), KEY `idx_prelevement_lignes_fk_prelevement_bons` (`fk_prelevement_bons`), CONSTRAINT `fk_prelevement_lignes_fk_prelevement_bons` FOREIGN KEY (`fk_prelevement_bons`) REFERENCES `llx_prelevement_bons` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7100,11 +7243,11 @@ CREATE TABLE `llx_prelevement_rejet` ( `motif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_creation` int(11) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `afacturer` tinyint(4) DEFAULT '0', `fk_facture` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7125,13 +7268,13 @@ DROP TABLE IF EXISTS `llx_printer_receipt`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_printer_receipt` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(128) DEFAULT NULL, + `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_type` int(11) DEFAULT NULL, `fk_profile` int(11) DEFAULT NULL, - `parameter` varchar(128) DEFAULT NULL, + `parameter` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7152,11 +7295,11 @@ DROP TABLE IF EXISTS `llx_printer_receipt_template`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_printer_receipt_template` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(128) DEFAULT NULL, - `template` text, + `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `template` text COLLATE utf8_unicode_ci, `entity` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7179,15 +7322,15 @@ CREATE TABLE `llx_printing` ( `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_id` varchar(255) NOT NULL, + `printer_name` text COLLATE utf8_unicode_ci NOT NULL, + `printer_location` text COLLATE utf8_unicode_ci NOT NULL, + `printer_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `copy` int(11) NOT NULL DEFAULT '1', - `module` varchar(16) NOT NULL, - `driver` varchar(16) NOT NULL, + `module` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `driver` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `userid` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7212,25 +7355,25 @@ CREATE TABLE `llx_product` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `virtual` tinyint(4) NOT NULL DEFAULT '0', `fk_parent` int(11) DEFAULT '0', - `ref` varchar(128) NOT NULL, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(128) DEFAULT NULL, - `label` varchar(255) NOT NULL, - `description` text, - `note` text, - `customcode` varchar(32) DEFAULT NULL, + `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci, + `customcode` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, `price` double(24,8) DEFAULT '0.00000000', `price_ttc` double(24,8) DEFAULT '0.00000000', `price_min` double(24,8) DEFAULT '0.00000000', `price_min_ttc` double(24,8) DEFAULT '0.00000000', - `price_base_type` varchar(3) DEFAULT 'HT', + `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT '0', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `tosell` tinyint(4) DEFAULT '1', @@ -7238,16 +7381,16 @@ CREATE TABLE `llx_product` ( `onportal` smallint(6) DEFAULT '0', `tobatch` tinyint(4) NOT NULL DEFAULT '0', `fk_product_type` int(11) DEFAULT '0', - `duration` varchar(6) DEFAULT NULL, + `duration` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `seuil_stock_alerte` int(11) DEFAULT NULL, - `url` varchar(255) DEFAULT NULL, - `barcode` varchar(255) DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, - `accountancy_code_sell` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `accountancy_code_sell_intra` varchar(32) DEFAULT NULL, - `accountancy_code_sell_export` varchar(32) DEFAULT NULL, - `accountancy_code_buy` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `partnumber` varchar(32) DEFAULT NULL, + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_sell_intra` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_sell_export` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `partnumber` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `weight` float DEFAULT NULL, `weight_units` tinyint(4) DEFAULT NULL, `length` float DEFAULT NULL, @@ -7260,18 +7403,18 @@ CREATE TABLE `llx_product` ( `pmp` double(24,8) NOT NULL DEFAULT '0.00000000', `fifo` double(24,8) DEFAULT NULL, `lifo` double(24,8) DEFAULT NULL, - `canvas` varchar(32) DEFAULT 'default@product', + `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'default@product', `finished` tinyint(4) DEFAULT NULL, `hidden` tinyint(4) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `desiredstock` int(11) DEFAULT '0', `fk_price_expression` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `cost_price` double(24,8) DEFAULT NULL, - `default_vat_code` varchar(10) DEFAULT NULL, + `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `price_autogen` smallint(6) DEFAULT '0', - `note_public` text, - `model_pdf` varchar(255) DEFAULT '', + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT '', `width` float DEFAULT NULL, `width_units` tinyint(4) DEFAULT NULL, `height` float DEFAULT NULL, @@ -7290,7 +7433,7 @@ CREATE TABLE `llx_product` ( 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`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7320,7 +7463,7 @@ CREATE TABLE `llx_product_association` ( UNIQUE KEY `uk_product_association` (`fk_product_pere`,`fk_product_fils`), KEY `idx_product_association` (`fk_product_fils`), KEY `idx_product_association_fils` (`fk_product_fils`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7454,16 +7597,16 @@ CREATE TABLE `llx_product_batch` ( `fk_product_stock` int(11) NOT NULL, `eatby` datetime DEFAULT NULL, `sellby` datetime DEFAULT NULL, - `batch` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double NOT NULL DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_batch` (`fk_product_stock`,`batch`), 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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7494,16 +7637,16 @@ CREATE TABLE `llx_product_customer_price` ( `price_ttc` double(24,8) DEFAULT '0.00000000', `price_min` double(24,8) DEFAULT '0.00000000', `price_min_ttc` double(24,8) DEFAULT '0.00000000', - `price_base_type` varchar(3) DEFAULT 'HT', + `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, - `default_vat_code` varchar(10) DEFAULT NULL, + `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT '0', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_customer_price_fk_product_fk_soc` (`fk_product`,`fk_soc`), KEY `idx_product_customer_price_fk_user` (`fk_user`), @@ -7514,7 +7657,7 @@ CREATE TABLE `llx_product_customer_price` ( 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; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7543,18 +7686,18 @@ CREATE TABLE `llx_product_customer_price_log` ( `price_ttc` double(24,8) DEFAULT '0.00000000', `price_min` double(24,8) DEFAULT '0.00000000', `price_min_ttc` double(24,8) DEFAULT '0.00000000', - `price_base_type` varchar(3) DEFAULT 'HT', + `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT '0', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `default_vat_code` varchar(10) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7577,10 +7720,10 @@ CREATE TABLE `llx_product_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_product_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7592,6 +7735,36 @@ LOCK TABLES `llx_product_extrafields` WRITE; /*!40000 ALTER TABLE `llx_product_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_product_factory` +-- + +DROP TABLE IF EXISTS `llx_product_factory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_factory` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_product_father` int(11) NOT NULL DEFAULT '0', + `fk_product_children` int(11) NOT NULL DEFAULT '0', + `pmp` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT '0.00000000', + `qty` double DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_factory` (`fk_product_father`,`fk_product_children`), + KEY `idx_product_factory_fils` (`fk_product_children`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_factory` +-- + +LOCK TABLES `llx_product_factory` WRITE; +/*!40000 ALTER TABLE `llx_product_factory` DISABLE KEYS */; +INSERT INTO `llx_product_factory` VALUES (2,26,25,0.00000000,0.00000000,3),(3,27,26,0.00000000,0.00000000,2); +/*!40000 ALTER TABLE `llx_product_factory` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_product_fournisseur_price` -- @@ -7605,7 +7778,7 @@ CREATE TABLE `llx_product_fournisseur_price` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_product` int(11) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `ref_fourn` varchar(30) DEFAULT NULL, + `ref_fourn` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_availability` int(11) DEFAULT NULL, `price` double(24,8) DEFAULT '0.00000000', `quantity` double DEFAULT NULL, @@ -7615,24 +7788,24 @@ CREATE TABLE `llx_product_fournisseur_price` ( `charges` double(24,8) DEFAULT '0.00000000', `unitcharges` double(24,8) DEFAULT '0.00000000', `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', - `default_vat_code` varchar(10) DEFAULT NULL, + `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `info_bits` int(11) NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_supplier_price_expression` int(11) DEFAULT NULL, `fk_price_expression` int(11) DEFAULT NULL, `delivery_time_days` int(11) DEFAULT NULL, - `supplier_reputation` varchar(10) DEFAULT NULL, + `supplier_reputation` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_price_ttc` double(24,8) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_price` double(24,8) DEFAULT NULL, `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_fournisseur_price_ref` (`ref_fourn`,`fk_soc`,`quantity`,`entity`), KEY `idx_product_fournisseur_price_fk_user` (`fk_user`), @@ -7640,7 +7813,7 @@ CREATE TABLE `llx_product_fournisseur_price` ( KEY `idx_product_fourn_price_fk_soc` (`fk_soc`,`entity`), CONSTRAINT `fk_product_fournisseur_price_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_product_fournisseur_price_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7668,12 +7841,12 @@ CREATE TABLE `llx_product_fournisseur_price_log` ( `quantity` double DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_price_ttc` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7696,15 +7869,15 @@ DROP TABLE IF EXISTS `llx_product_lang`; CREATE TABLE `llx_product_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_product` int(11) NOT NULL DEFAULT '0', - `lang` varchar(5) NOT NULL DEFAULT '0', - `label` varchar(255) NOT NULL, - `description` text, - `note` text, - `import_key` varchar(14) DEFAULT NULL, + `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, 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=18 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7728,7 +7901,7 @@ CREATE TABLE `llx_product_lot` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT '1', `fk_product` int(11) NOT NULL, - `batch` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `datec` datetime DEFAULT NULL, @@ -7738,7 +7911,7 @@ CREATE TABLE `llx_product_lot` ( `import_key` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lot` (`fk_product`,`batch`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7795,21 +7968,21 @@ CREATE TABLE `llx_product_price` ( `price_ttc` double(24,8) DEFAULT NULL, `price_min` double(24,8) DEFAULT NULL, `price_min_ttc` double(24,8) DEFAULT NULL, - `price_base_type` varchar(3) DEFAULT 'HT', + `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) NOT NULL, - `default_vat_code` varchar(10) DEFAULT NULL, + `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT '0', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, `tosell` tinyint(4) DEFAULT '1', `price_by_qty` int(11) NOT NULL DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_price_expression` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_price` double(24,8) DEFAULT '0.00000000', `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_price_ttc` double(24,8) DEFAULT NULL, @@ -7818,7 +7991,7 @@ CREATE TABLE `llx_product_price` ( KEY `idx_product_price_fk_product` (`fk_product`), CONSTRAINT `fk_product_price_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7849,12 +8022,12 @@ CREATE TABLE `llx_product_price_by_qty` ( `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `quantity` double DEFAULT NULL, `unitprice` double(24,8) DEFAULT '0.00000000', - `price_base_type` varchar(3) DEFAULT 'HT', + `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_price_ttc` double(24,8) DEFAULT NULL, @@ -7862,7 +8035,7 @@ CREATE TABLE `llx_product_price_by_qty` ( UNIQUE KEY `uk_product_price_by_qty_level` (`fk_product_price`,`quantity`), KEY `idx_product_price_by_qty_fk_product_price` (`fk_product_price`), CONSTRAINT `fk_product_price_by_qty_fk_product_price` FOREIGN KEY (`fk_product_price`) REFERENCES `llx_product_price` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7889,7 +8062,7 @@ CREATE TABLE `llx_product_pricerules` ( `var_min_percent` float NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `unique_level` (`level`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7914,12 +8087,12 @@ CREATE TABLE `llx_product_stock` ( `fk_product` int(11) NOT NULL, `fk_entrepot` int(11) NOT NULL, `reel` double DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_stock` (`fk_product`,`fk_entrepot`), KEY `idx_product_stock_fk_product` (`fk_product`), KEY `idx_product_stock_fk_entrepot` (`fk_entrepot`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7945,7 +8118,7 @@ CREATE TABLE `llx_product_subproduct` ( `fk_product_subproduct` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `fk_product` (`fk_product`,`fk_product_subproduct`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7999,29 +8172,29 @@ CREATE TABLE `llx_projet` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `dateo` date DEFAULT NULL, `datee` date DEFAULT NULL, - `ref` varchar(50) DEFAULT NULL, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `title` varchar(255) NOT NULL, - `description` text, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, `fk_user_creat` int(11) NOT NULL, `public` int(11) DEFAULT NULL, `fk_statut` smallint(6) NOT NULL DEFAULT '0', `fk_opp_status` int(11) DEFAULT NULL, `opp_percent` double(5,2) DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `budget_amount` double(24,8) DEFAULT NULL, `date_close` datetime DEFAULT NULL, `fk_user_close` int(11) DEFAULT NULL, `opp_amount` double(24,8) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_ref` (`ref`,`entity`), KEY `idx_projet_fk_soc` (`fk_soc`), CONSTRAINT `fk_projet_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8045,11 +8218,11 @@ CREATE TABLE `llx_projet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, - `priority` text, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `priority` mediumtext COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), KEY `idx_projet_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8071,7 +8244,7 @@ DROP TABLE IF EXISTS `llx_projet_task`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_projet_task` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(50) DEFAULT NULL, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', `fk_projet` int(11) NOT NULL, `fk_task_parent` int(11) NOT NULL DEFAULT '0', @@ -8080,8 +8253,8 @@ CREATE TABLE `llx_projet_task` ( `dateo` datetime DEFAULT NULL, `datee` datetime DEFAULT NULL, `datev` datetime DEFAULT NULL, - `label` varchar(255) NOT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, `duration_effective` double DEFAULT '0', `planned_workload` double DEFAULT '0', `progress` int(11) DEFAULT '0', @@ -8089,11 +8262,11 @@ CREATE TABLE `llx_projet_task` ( `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `fk_statut` smallint(6) NOT NULL DEFAULT '0', - `note_private` text, - `note_public` text, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, `rang` int(11) DEFAULT '0', - `model_pdf` varchar(255) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_task_ref` (`ref`,`entity`), KEY `idx_projet_task_fk_projet` (`fk_projet`), @@ -8102,7 +8275,7 @@ CREATE TABLE `llx_projet_task` ( CONSTRAINT `fk_projet_task_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), CONSTRAINT `fk_projet_task_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_projet_task_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8126,10 +8299,10 @@ CREATE TABLE `llx_projet_task_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_projet_task_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8157,17 +8330,17 @@ CREATE TABLE `llx_projet_task_time` ( `task_duration` double DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `thm` double(24,8) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `invoice_id` int(11) DEFAULT NULL, `invoice_line_id` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `datec` date DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), KEY `idx_projet_task_time_task` (`fk_task`), KEY `idx_projet_task_time_date` (`task_date`), KEY `idx_projet_task_time_datehour` (`task_datehour`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8176,10 +8349,69 @@ CREATE TABLE `llx_projet_task_time` ( LOCK TABLES `llx_projet_task_time` WRITE; /*!40000 ALTER TABLE `llx_projet_task_time` DISABLE KEYS */; -INSERT INTO `llx_projet_task_time` VALUES (2,4,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(3,4,'2014-12-18','2014-12-18 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(4,3,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(5,3,'2014-12-21','2014-12-21 12:00:00',0,1800,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(6,3,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(7,6,'2016-07-25','2016-07-25 00:00:00',0,18000,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(8,6,'2016-07-26','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(9,6,'2016-07-27','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(10,6,'2016-07-29','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(11,6,'2016-07-31','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(12,7,'2016-07-25','2016-07-25 00:00:00',0,10800,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(13,7,'2016-07-26','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(14,7,'2016-07-27','2016-07-25 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(15,7,'2017-01-30','2017-01-30 10:00:00',1,660,12,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'); +INSERT INTO `llx_projet_task_time` VALUES (2,4,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(3,4,'2014-12-18','2014-12-18 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(4,3,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(5,3,'2014-12-21','2014-12-21 12:00:00',0,1800,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(6,3,'2014-12-21','2014-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(7,6,'2016-07-25','2016-07-25 00:00:00',0,18000,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(8,6,'2016-07-26','2016-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(9,6,'2016-07-27','2016-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(10,6,'2016-07-29','2016-07-29 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(11,6,'2016-07-31','2016-07-31 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(12,7,'2016-07-25','2016-07-25 00:00:00',0,10800,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(13,7,'2016-07-26','2016-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(14,7,'2016-07-27','2016-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(15,7,'2017-01-30','2017-01-30 10:00:00',1,660,12,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'); /*!40000 ALTER TABLE `llx_projet_task_time` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_projet_taskdet` +-- + +DROP TABLE IF EXISTS `llx_projet_taskdet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_projet_taskdet` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_task` int(11) NOT NULL DEFAULT '0', + `fk_product` int(11) NOT NULL DEFAULT '0', + `qty_planned` double DEFAULT NULL, + `qty_used` double DEFAULT NULL, + `qty_deleted` double DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `pmp` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT '0.00000000', + `fk_statut` int(11) NOT NULL DEFAULT '0', + `note_public` mediumtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_projet_taskdet` (`fk_task`,`fk_product`), + KEY `idx_projet_taskdet_fk_task` (`fk_task`), + KEY `idx_projet_taskdet_fk_product` (`fk_product`), + CONSTRAINT `fk_projet_taskdet_fk_task` FOREIGN KEY (`fk_task`) REFERENCES `llx_projet_task` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_projet_taskdet` +-- + +LOCK TABLES `llx_projet_taskdet` WRITE; +/*!40000 ALTER TABLE `llx_projet_taskdet` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_projet_taskdet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_projet_taskdet_equipement` +-- + +DROP TABLE IF EXISTS `llx_projet_taskdet_equipement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_projet_taskdet_equipement` ( + `fk_equipement` int(11) NOT NULL DEFAULT '0', + `fk_projet_taskdet` int(11) NOT NULL DEFAULT '0', + UNIQUE KEY `uk_factory_equipement` (`fk_equipement`,`fk_projet_taskdet`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_projet_taskdet_equipement` +-- + +LOCK TABLES `llx_projet_taskdet_equipement` WRITE; +/*!40000 ALTER TABLE `llx_projet_taskdet_equipement` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_projet_taskdet_equipement` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_propal` -- @@ -8192,11 +8424,11 @@ CREATE TABLE `llx_propal` ( `fk_soc` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(255) DEFAULT NULL, - `ref_client` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `datec` datetime DEFAULT NULL, `datep` date DEFAULT NULL, `fin_validite` datetime DEFAULT NULL, @@ -8217,28 +8449,28 @@ CREATE TABLE `llx_propal` ( `localtax2` double(24,8) DEFAULT '0.00000000', `total` double(24,8) DEFAULT '0.00000000', `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) DEFAULT NULL, + `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, `fk_availability` int(11) DEFAULT NULL, `fk_delivery_address` int(11) DEFAULT NULL, `fk_input_reason` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_propal_ref` (`ref`,`entity`), KEY `idx_propal_fk_soc` (`fk_soc`), @@ -8253,7 +8485,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=33 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8277,10 +8509,10 @@ CREATE TABLE `llx_propal_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_propal_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8302,15 +8534,15 @@ DROP TABLE IF EXISTS `llx_propal_merge_pdf_product`; CREATE TABLE `llx_propal_merge_pdf_product` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_product` int(11) NOT NULL, - `file_name` varchar(200) NOT NULL, - `lang` varchar(5) DEFAULT NULL, + `file_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `lang` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) NOT NULL, `datec` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8334,15 +8566,15 @@ CREATE TABLE `llx_propaldet` ( `fk_propal` int(11) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `fk_remise_except` int(11) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT '0.000', - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -8363,7 +8595,7 @@ CREATE TABLE `llx_propaldet` ( `rang` int(11) DEFAULT '0', `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -8374,7 +8606,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=109 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8398,10 +8630,10 @@ CREATE TABLE `llx_propaldet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_propaldet_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8423,12 +8655,12 @@ DROP TABLE IF EXISTS `llx_resource`; CREATE TABLE `llx_resource` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `ref` varchar(255) DEFAULT NULL, - `asset_number` varchar(255) DEFAULT NULL, - `description` text, - `fk_code_type_resource` varchar(32) DEFAULT NULL, - `note_public` text, - `note_private` text, + `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `asset_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, + `fk_code_type_resource` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -8436,15 +8668,15 @@ CREATE TABLE `llx_resource` ( `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `fk_statut` smallint(6) NOT NULL DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_resource_ref` (`ref`,`entity`), KEY `fk_code_type_resource_idx` (`fk_code_type_resource`), KEY `idx_resource_fk_country` (`fk_country`), CONSTRAINT `fk_resource_fk_country` FOREIGN KEY (`fk_country`) REFERENCES `llx_c_country` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8492,15 +8724,15 @@ DROP TABLE IF EXISTS `llx_rights_def`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_rights_def` ( `id` int(11) NOT NULL DEFAULT '0', - `libelle` varchar(255) DEFAULT NULL, - `module` varchar(64) DEFAULT NULL, + `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `perms` varchar(50) DEFAULT NULL, - `subperms` varchar(50) DEFAULT NULL, - `type` varchar(1) DEFAULT NULL, + `perms` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `subperms` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `type` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, `bydefault` tinyint(4) DEFAULT '0', PRIMARY KEY (`id`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8509,7 +8741,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,'Read invoices','facture',1,'lire',NULL,'a',0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Delete invoices','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),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0),(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',0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',0),(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',0),(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),(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',0),(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,'Read third parties','societe',1,'lire',NULL,'r',0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Export third parties','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,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',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',2,'client','voir','r',1),(281,'Read contacts','societe',1,'contact','lire','r',0),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Create and update contact','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Export 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',0),(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',0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0),(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),(501,'Read employee contracts/salaries','salaries',1,'read',NULL,'r',0),(502,'Create/modify employee contracts/salaries','salaries',1,'write',NULL,'w',0),(511,'Read payment of salaries','salaries',1,'payment','read','w',0),(512,'Create/modify payment of salaries','salaries',1,'payment','write','w',0),(514,'Delete contracts/salaries','salaries',1,'delete',NULL,'d',0),(517,'Export employee contracts and salaries payments','salaries',1,'export',NULL,'r',0),(520,'Read loans','loan',1,'read',NULL,'r',0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0),(524,'Delete loans','loan',1,'delete',NULL,'d',0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0),(527,'Export loans','loan',1,'export',NULL,'r',0),(531,'Lire les services','service',1,'lire',NULL,'r',0),(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),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',1),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',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),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',1),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0),(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',0),(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,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','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',0),(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',0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0),(20001,'Read your own holidays','holiday',1,'read',NULL,'w',0),(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',0),(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',0),(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),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear',NULL,'r',0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0),(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),(63001,'Read resources','resource',1,'read',NULL,'w',1),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0),(63004,'Link resources','resource',1,'link',NULL,'w',0),(64001,'DirectPrint','printing',1,'read',NULL,'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); +INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Delete invoices','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),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0),(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',0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',0),(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',0),(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),(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',0),(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,'Read third parties','societe',1,'lire',NULL,'r',0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Export third parties','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,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',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',2,'client','voir','r',1),(281,'Read contacts','societe',1,'contact','lire','r',0),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Create and update contact','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Export 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',0),(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',0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0),(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),(501,'Read employee contracts/salaries','salaries',1,'read',NULL,'r',0),(502,'Create/modify employee contracts/salaries','salaries',1,'write',NULL,'w',0),(511,'Read payment of salaries','salaries',1,'payment','read','w',0),(512,'Create/modify payment of salaries','salaries',1,'payment','write','w',0),(514,'Delete contracts/salaries','salaries',1,'delete',NULL,'d',0),(517,'Export employee contracts and salaries payments','salaries',1,'export',NULL,'r',0),(520,'Read loans','loan',1,'read',NULL,'r',0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0),(524,'Delete loans','loan',1,'delete',NULL,'d',0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0),(527,'Export loans','loan',1,'export',NULL,'r',0),(531,'Lire les services','service',1,'lire',NULL,'r',0),(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),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',1),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',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),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',1),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0),(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',0),(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,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','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',0),(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',0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0),(20001,'Read your own holidays','holiday',1,'read',NULL,'w',0),(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',0),(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',0),(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),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear',NULL,'r',0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0),(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),(63001,'Read resources','resource',1,'read',NULL,'w',1),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0),(63004,'Link resources','resource',1,'link',NULL,'w',0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; @@ -8526,42 +8758,42 @@ CREATE TABLE `llx_societe` ( `parent` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `datec` datetime DEFAULT NULL, - `nom` varchar(128) DEFAULT NULL, + `nom` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(60) DEFAULT NULL, - `code_client` varchar(24) DEFAULT NULL, - `code_fournisseur` varchar(24) DEFAULT NULL, - `code_compta` varchar(24) DEFAULT NULL, - `code_compta_fournisseur` varchar(24) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(25) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_client` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_fournisseur` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_compta` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_compta_fournisseur` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_departement` int(11) DEFAULT '0', `fk_pays` int(11) DEFAULT '0', - `phone` varchar(20) DEFAULT NULL, - `fax` varchar(20) DEFAULT NULL, - `url` varchar(255) DEFAULT NULL, - `email` varchar(128) DEFAULT NULL, - `skype` varchar(255) DEFAULT NULL, + `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_effectif` int(11) DEFAULT '0', `fk_typent` int(11) DEFAULT '0', `fk_forme_juridique` int(11) DEFAULT '0', - `fk_currency` varchar(3) DEFAULT NULL, - `siren` varchar(128) DEFAULT NULL, - `siret` varchar(128) DEFAULT NULL, - `ape` varchar(128) DEFAULT NULL, - `idprof4` varchar(128) DEFAULT NULL, - `tva_intra` varchar(20) DEFAULT NULL, + `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, + `siren` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `siret` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `ape` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `idprof4` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `tva_intra` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `capital` double(24,8) DEFAULT NULL, `fk_stcomm` int(11) NOT NULL DEFAULT '0', - `note_private` text, - `note_public` text, - `prefix_comm` varchar(5) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `prefix_comm` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `client` tinyint(4) DEFAULT '0', `fournisseur` tinyint(4) DEFAULT '0', - `supplier_account` varchar(32) DEFAULT NULL, - `fk_prospectlevel` varchar(12) DEFAULT NULL, + `supplier_account` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_prospectlevel` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, `customer_bad` tinyint(4) DEFAULT '0', `customer_rate` double DEFAULT '0', `supplier_rate` double DEFAULT '0', @@ -8579,24 +8811,24 @@ CREATE TABLE `llx_societe` ( `localtax1_value` double(6,3) DEFAULT NULL, `localtax2_assuj` tinyint(4) DEFAULT '0', `localtax2_value` double(6,3) DEFAULT NULL, - `barcode` varchar(255) DEFAULT NULL, + `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `price_level` int(11) DEFAULT NULL, - `default_lang` varchar(6) DEFAULT NULL, - `canvas` varchar(32) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `default_lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `status` tinyint(4) DEFAULT '1', - `logo` varchar(255) DEFAULT NULL, - `idprof5` varchar(128) DEFAULT NULL, - `idprof6` varchar(128) DEFAULT NULL, + `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `idprof5` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `idprof6` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT '0', - `webservices_url` varchar(255) DEFAULT NULL, - `webservices_key` varchar(128) DEFAULT NULL, - `name_alias` varchar(128) DEFAULT NULL, + `webservices_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `webservices_key` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `name_alias` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) DEFAULT NULL, - `model_pdf` varchar(255) DEFAULT NULL, + `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), @@ -8606,7 +8838,7 @@ CREATE TABLE `llx_societe` ( KEY `idx_societe_user_creat` (`fk_user_creat`), KEY `idx_societe_user_modif` (`fk_user_modif`), KEY `idx_societe_barcode` (`barcode`) -) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8630,20 +8862,20 @@ CREATE TABLE `llx_societe_address` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(30) DEFAULT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT '0', - `name` varchar(60) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(10) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `name` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_pays` int(11) DEFAULT '0', - `phone` varchar(20) DEFAULT NULL, - `fax` varchar(20) DEFAULT NULL, - `note` text, + `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8666,10 +8898,10 @@ CREATE TABLE `llx_societe_commerciaux` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci 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=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8693,10 +8925,10 @@ CREATE TABLE `llx_societe_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8722,10 +8954,10 @@ CREATE TABLE `llx_societe_log` ( `fk_soc` int(11) DEFAULT NULL, `fk_statut` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `author` varchar(30) DEFAULT NULL, - `label` varchar(128) DEFAULT NULL, + `author` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8752,7 +8984,7 @@ CREATE TABLE `llx_societe_prices` ( `fk_user_author` int(11) DEFAULT NULL, `price_level` tinyint(4) DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8779,9 +9011,9 @@ CREATE TABLE `llx_societe_remise` ( `datec` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `remise_client` double(6,3) NOT NULL DEFAULT '0.000', - `note` text, + `note` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8813,7 +9045,7 @@ CREATE TABLE `llx_societe_remise_except` ( `fk_facture_line` int(11) DEFAULT NULL, `fk_facture` int(11) DEFAULT NULL, `fk_facture_source` int(11) DEFAULT NULL, - `description` text NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, `multicurrency_amount_ht` double(24,8) NOT NULL DEFAULT '0.00000000', `multicurrency_amount_tva` double(24,8) NOT NULL DEFAULT '0.00000000', `multicurrency_amount_ttc` double(24,8) NOT NULL DEFAULT '0.00000000', @@ -8828,17 +9060,17 @@ CREATE TABLE `llx_societe_remise_except` ( KEY `idx_societe_remise_except_fk_facture_source` (`fk_facture_source`), KEY `fk_soc_remise_fk_invoice_supplier_line` (`fk_invoice_supplier_line`), KEY `fk_societe_remise_fk_invoice_supplier_source` (`fk_invoice_supplier`), - CONSTRAINT `fk_soc_remise_fk_facture_line` FOREIGN KEY (`fk_facture_line`) REFERENCES `llx_facturedet` (`rowid`), - CONSTRAINT `fk_soc_remise_fk_invoice_supplier_line` FOREIGN KEY (`fk_invoice_supplier_line`) REFERENCES `llx_facture_fourn_det` (`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`), CONSTRAINT `fk_societe_remise_fk_invoice_supplier` FOREIGN KEY (`fk_invoice_supplier`) REFERENCES `llx_facture_fourn` (`rowid`), CONSTRAINT `fk_societe_remise_fk_invoice_supplier_source` FOREIGN KEY (`fk_invoice_supplier`) REFERENCES `llx_facture_fourn` (`rowid`), CONSTRAINT `fk_societe_remise_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), - CONSTRAINT `fk_societe_remise_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; + CONSTRAINT `fk_societe_remise_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_soc_remise_fk_facture_line` FOREIGN KEY (`fk_facture_line`) REFERENCES `llx_facturedet` (`rowid`), + CONSTRAINT `fk_soc_remise_fk_invoice_supplier_line` FOREIGN KEY (`fk_invoice_supplier_line`) REFERENCES `llx_facture_fourn_det` (`rowid`), + CONSTRAINT `fk_soc_remise_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8863,24 +9095,24 @@ CREATE TABLE `llx_societe_rib` ( `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(30) DEFAULT NULL, - `bank` varchar(255) DEFAULT NULL, - `code_banque` varchar(128) DEFAULT NULL, - `code_guichet` varchar(6) DEFAULT NULL, - `number` varchar(255) DEFAULT NULL, - `cle_rib` varchar(5) DEFAULT NULL, - `bic` varchar(20) DEFAULT NULL, - `iban_prefix` varchar(34) DEFAULT NULL, - `domiciliation` varchar(255) DEFAULT NULL, - `proprio` varchar(60) DEFAULT NULL, - `owner_address` text, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `bic` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `iban_prefix` varchar(34) COLLATE utf8_unicode_ci DEFAULT NULL, + `domiciliation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `proprio` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `owner_address` text COLLATE utf8_unicode_ci, `default_rib` tinyint(4) NOT NULL DEFAULT '0', - `rum` varchar(32) DEFAULT NULL, + `rum` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `date_rum` date DEFAULT NULL, - `frstrecur` varchar(16) DEFAULT 'FRST', - `import_key` varchar(14) DEFAULT NULL, + `frstrecur` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'FRST', + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8906,41 +9138,41 @@ CREATE TABLE `llx_socpeople` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_soc` int(11) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `civility` varchar(6) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(25) DEFAULT NULL, - `town` text, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` text COLLATE utf8_unicode_ci, `fk_departement` int(11) DEFAULT NULL, `fk_pays` int(11) DEFAULT '0', `birthday` date DEFAULT NULL, - `poste` varchar(80) DEFAULT NULL, - `phone` varchar(30) DEFAULT NULL, - `phone_perso` varchar(30) DEFAULT NULL, - `phone_mobile` varchar(30) DEFAULT NULL, - `fax` varchar(30) DEFAULT NULL, - `email` varchar(255) DEFAULT NULL, - `jabberid` varchar(255) DEFAULT NULL, - `skype` varchar(255) DEFAULT NULL, - `photo` varchar(255) DEFAULT NULL, + `poste` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone_perso` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone_mobile` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `fax` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `jabberid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `priv` smallint(6) NOT NULL DEFAULT '0', `no_email` smallint(6) NOT NULL DEFAULT '0', `fk_user_creat` int(11) DEFAULT '0', `fk_user_modif` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `default_lang` varchar(6) DEFAULT NULL, - `canvas` varchar(32) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `default_lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `statut` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), KEY `idx_socpeople_fk_soc` (`fk_soc`), 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=13 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8964,10 +9196,10 @@ CREATE TABLE `llx_socpeople_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_socpeople_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8979,6 +9211,38 @@ LOCK TABLES `llx_socpeople_extrafields` WRITE; /*!40000 ALTER TABLE `llx_socpeople_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_stock_lotserial` +-- + +DROP TABLE IF EXISTS `llx_stock_lotserial`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_stock_lotserial` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) DEFAULT NULL, + `fk_product` int(11) NOT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `eatby` date DEFAULT NULL, + `sellby` date DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `import_key` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_stock_lotserial` +-- + +LOCK TABLES `llx_stock_lotserial` WRITE; +/*!40000 ALTER TABLE `llx_stock_lotserial` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_stock_lotserial` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_stock_mouvement` -- @@ -8996,17 +9260,17 @@ CREATE TABLE `llx_stock_mouvement` ( `price` double(24,8) DEFAULT '0.00000000', `type_mouvement` smallint(6) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_origin` int(11) DEFAULT NULL, - `origintype` varchar(32) DEFAULT NULL, - `inventorycode` varchar(128) DEFAULT NULL, - `batch` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `origintype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `inventorycode` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_stock_mouvement_fk_product` (`fk_product`), KEY `idx_stock_mouvement_fk_entrepot` (`fk_entrepot`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9059,10 +9323,10 @@ DROP TABLE IF EXISTS `llx_supplier_proposal`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_supplier_proposal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) NOT NULL, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `ref_ext` varchar(255) DEFAULT NULL, - `ref_int` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -9084,25 +9348,25 @@ CREATE TABLE `llx_supplier_proposal` ( `localtax2` double(24,8) DEFAULT '0.00000000', `total` double(24,8) DEFAULT '0.00000000', `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) DEFAULT NULL, + `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `extraparams` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT '1.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `last_main_doc` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9126,9 +9390,9 @@ CREATE TABLE `llx_supplier_proposal_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9152,15 +9416,15 @@ CREATE TABLE `llx_supplier_proposaldet` ( `fk_supplier_proposal` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `description` text, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci, `fk_remise_except` int(11) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT '0.000', - `vat_src_code` varchar(10) DEFAULT '', + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax1_type` varchar(10) DEFAULT NULL, + `localtax1_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `localtax2_tx` double(6,3) DEFAULT '0.000', - `localtax2_type` varchar(10) DEFAULT NULL, + `localtax2_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT '0', `remise` double DEFAULT '0', @@ -9177,9 +9441,9 @@ CREATE TABLE `llx_supplier_proposaldet` ( `fk_product_fournisseur_price` int(11) DEFAULT NULL, `special_code` int(11) DEFAULT '0', `rang` int(11) DEFAULT '0', - `ref_fourn` varchar(30) DEFAULT NULL, + `ref_fourn` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(255) DEFAULT NULL, + `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', @@ -9191,7 +9455,7 @@ CREATE TABLE `llx_supplier_proposaldet` ( KEY `fk_supplier_proposaldet_fk_unit` (`fk_unit`), CONSTRAINT `fk_supplier_proposaldet_fk_supplier_proposal` FOREIGN KEY (`fk_supplier_proposal`) REFERENCES `llx_supplier_proposal` (`rowid`), CONSTRAINT `fk_supplier_proposaldet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9215,9 +9479,9 @@ CREATE TABLE `llx_supplier_proposaldet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9243,17 +9507,17 @@ CREATE TABLE `llx_tva` ( `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `note` text, + `note` text COLLATE utf8_unicode_ci, `fk_bank` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_typepayment` int(11) DEFAULT NULL, - `num_payment` varchar(50) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9278,65 +9542,65 @@ CREATE TABLE `llx_user` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `login` varchar(50) NOT NULL, + `login` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `civility` varchar(6) DEFAULT NULL, - `ref_ext` varchar(50) DEFAULT NULL, - `ref_int` varchar(50) DEFAULT NULL, + `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_ext` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_int` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `employee` smallint(6) DEFAULT '1', `fk_establishment` int(11) DEFAULT '0', - `pass` varchar(128) DEFAULT NULL, - `pass_crypted` varchar(128) DEFAULT NULL, - `pass_temp` varchar(128) DEFAULT NULL, - `api_key` varchar(128) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `job` varchar(128) DEFAULT NULL, - `skype` varchar(255) DEFAULT NULL, - `office_phone` varchar(20) DEFAULT NULL, - `office_fax` varchar(20) DEFAULT NULL, - `user_mobile` varchar(20) DEFAULT NULL, - `email` varchar(255) DEFAULT NULL, - `signature` text, + `pass` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass_crypted` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass_temp` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `api_key` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `job` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `office_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `office_fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `user_mobile` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `signature` text COLLATE utf8_unicode_ci, `admin` smallint(6) DEFAULT '0', - `webcal_login` varchar(25) DEFAULT NULL, + `webcal_login` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `module_comm` smallint(6) DEFAULT '1', `module_compta` smallint(6) DEFAULT '1', `fk_soc` int(11) DEFAULT NULL, `fk_socpeople` int(11) DEFAULT NULL, `fk_member` int(11) DEFAULT NULL, - `note` text, + `note` text COLLATE utf8_unicode_ci, `datelastlogin` datetime DEFAULT NULL, `datepreviouslogin` datetime DEFAULT NULL, `egroupware_id` int(11) DEFAULT NULL, - `ldap_sid` varchar(255) DEFAULT NULL, + `ldap_sid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `statut` tinyint(4) DEFAULT '1', - `photo` varchar(255) DEFAULT NULL, - `lang` varchar(6) DEFAULT NULL, - `openid` varchar(255) DEFAULT NULL, + `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `openid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `thm` double(24,8) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `zip` varchar(25) DEFAULT NULL, - `town` varchar(50) DEFAULT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, + `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_state` int(11) DEFAULT '0', `fk_country` int(11) DEFAULT '0', - `color` varchar(6) DEFAULT NULL, - `accountancy_code` varchar(32) DEFAULT NULL, - `barcode` varchar(255) DEFAULT NULL, + `color` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT '0', `nb_holiday` int(11) DEFAULT '0', `salary` double(24,8) DEFAULT NULL, `tjm` double(24,8) DEFAULT NULL, `salaryextra` double(24,8) DEFAULT NULL, `weeklyhours` double(16,8) DEFAULT NULL, - `gender` varchar(10) DEFAULT NULL, - `note_public` text, + `gender` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci, `dateemployment` datetime DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, - `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `birth` date DEFAULT NULL, - `pass_encoding` varchar(24) DEFAULT NULL, + `pass_encoding` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `default_range` int(11) DEFAULT NULL, `default_c_exp_tax_cat` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -9346,7 +9610,7 @@ CREATE TABLE `llx_user` ( 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=20 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9355,7 +9619,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','2017-02-01 15:06:04',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,1,0,NULL,'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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2017-02-01 15:06:04',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','','','09123123','','','daviddoe@mycompany.com','',0,'',1,1,NULL,NULL,NULL,'','2016-07-30 23:10:54','2016-07-30 23:04:17',NULL,'',1,'johndoe.png',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2017-02-01 15:06:04',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2017-02-01 15:06:04',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2015-10-03 11:47:41','2017-02-01 15:06:04',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'52cda011808bb282d1d3625ab607a145',NULL,'t3mnkbhs','Curie','Marie','','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-10-05 09:07:52','2017-02-01 15:06:04',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,1,0,NULL,'92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2015-10-05 09:09:46','2018-01-19 11:24:18',NULL,NULL,'admin',0,NULL,NULL,NULL,1,0,NULL,'f6fdffe48c908deb0f4c3bd36c032e72',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2018-01-19 11:21:41','2018-01-19 11:18:47',NULL,'',1,'mariecurie.jpg',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2015-10-05 21:29:35','2017-02-01 15:06:04',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,1,0,NULL,'179858e041af35e8f4c81d68c55fe9da',NULL,'y451ksdv','Commercy','Charle','Commercial leader','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2015-10-05 21:33:33','2017-02-01 15:06:04',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2015-10-05 22:47:52','2017-02-20 16:49:00',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2015-10-05 22:48:39','2017-02-01 15:06:04',NULL,NULL,'cc2',1,NULL,NULL,NULL,1,0,NULL,'a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Charle2','Commerson','Sale representative','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2016-01-22 17:27:02','2017-02-01 15:06:04',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'1bb7805145a7a5066df9e6d585b8b645',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,1,1,10,10,NULL,'More information on http://www.destailleur.fr','2017-09-06 11:55:30','2017-08-30 15:53:25',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2017-02-01 23:56:50',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'a7a77a5aff2d5fc2f75f2f61507c88d4',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,12,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,NULL,NULL,NULL,32.00000000,NULL,NULL,'2014-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2017-02-01 15:06:04',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,1,0,NULL,'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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2017-02-01 15:06:04',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','','','09123123','','','daviddoe@mycompany.com','',0,'',1,1,NULL,NULL,NULL,'','2016-07-30 23:10:54','2016-07-30 23:04:17',NULL,'',1,'johndoe.png',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2017-02-01 15:06:04',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2017-02-01 15:06:04',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2015-10-03 11:47:41','2017-02-01 15:06:04',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'52cda011808bb282d1d3625ab607a145',NULL,'t3mnkbhs','Curie','Marie','','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-10-05 09:07:52','2017-02-01 15:06:04',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,1,0,NULL,'92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2015-10-05 09:09:46','2018-01-19 11:24:18',NULL,NULL,'admin',0,NULL,NULL,NULL,1,0,NULL,'f6fdffe48c908deb0f4c3bd36c032e72',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2018-03-16 13:54:23','2018-01-19 11:21:41',NULL,'',1,'mariecurie.jpg',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2015-10-05 21:29:35','2017-02-01 15:06:04',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,1,0,NULL,'179858e041af35e8f4c81d68c55fe9da',NULL,'y451ksdv','Commercy','Charle','Commercial leader','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2015-10-05 21:33:33','2017-02-01 15:06:04',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2015-10-05 22:47:52','2017-02-20 16:49:00',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','','',0,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2015-10-05 22:48:39','2017-02-01 15:06:04',NULL,NULL,'cc2',1,NULL,NULL,NULL,1,0,NULL,'a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Charle2','Commerson','Sale representative','','','','','','',0,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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2016-01-22 17:27:02','2017-02-01 15:06:04',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'1bb7805145a7a5066df9e6d585b8b645',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,1,1,10,10,NULL,'More information on http://www.destailleur.fr','2017-09-06 11:55:30','2017-08-30 15:53:25',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2017-02-01 23:56:50',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'a7a77a5aff2d5fc2f75f2f61507c88d4',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,12,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,NULL,NULL,NULL,32.00000000,NULL,NULL,'2014-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; UNLOCK TABLES; @@ -9372,7 +9636,7 @@ CREATE TABLE `llx_user_alert` ( `fk_contact` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9394,12 +9658,12 @@ DROP TABLE IF EXISTS `llx_user_clicktodial`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_user_clicktodial` ( `fk_user` int(11) NOT NULL, - `url` varchar(255) DEFAULT NULL, - `login` varchar(32) DEFAULT NULL, - `pass` varchar(64) DEFAULT NULL, - `poste` varchar(20) DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `login` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `poste` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`fk_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9462,10 +9726,10 @@ CREATE TABLE `llx_user_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_user_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9487,10 +9751,10 @@ DROP TABLE IF EXISTS `llx_user_param`; CREATE TABLE `llx_user_param` ( `fk_user` int(11) NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', - `param` varchar(255) NOT NULL, - `value` text NOT NULL, + `param` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `uk_user_param` (`fk_user`,`param`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9516,19 +9780,19 @@ CREATE TABLE `llx_user_rib` ( `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(30) DEFAULT NULL, - `bank` varchar(255) DEFAULT NULL, - `code_banque` varchar(128) DEFAULT NULL, - `code_guichet` varchar(6) DEFAULT NULL, - `number` varchar(255) DEFAULT NULL, - `cle_rib` varchar(5) DEFAULT NULL, - `bic` varchar(11) DEFAULT NULL, - `iban_prefix` varchar(34) DEFAULT NULL, - `domiciliation` varchar(255) DEFAULT NULL, - `proprio` varchar(60) DEFAULT NULL, - `owner_address` varchar(255) DEFAULT NULL, + `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, + `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `bic` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL, + `iban_prefix` varchar(34) COLLATE utf8_unicode_ci DEFAULT NULL, + `domiciliation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `proprio` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, + `owner_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9556,7 +9820,7 @@ CREATE TABLE `llx_user_rights` ( UNIQUE KEY `uk_user_rights` (`entity`,`fk_user`,`fk_id`), KEY `fk_user_rights_fk_user_user` (`fk_user`), CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=16208 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=16387 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9565,7 +9829,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,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(16076,1,12,11),(16066,1,12,12),(16068,1,12,13),(16070,1,12,14),(16072,1,12,15),(16075,1,12,16),(16078,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(16046,1,12,81),(16040,1,12,82),(16041,1,12,84),(16042,1,12,86),(16044,1,12,87),(16045,1,12,88),(16047,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(14939,1,12,101),(14935,1,12,102),(14936,1,12,104),(14937,1,12,105),(14938,1,12,106),(14940,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(16135,1,12,121),(16131,1,12,122),(16134,1,12,125),(16137,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(16178,1,12,251),(16159,1,12,252),(16161,1,12,253),(16162,1,12,254),(16164,1,12,255),(16166,1,12,256),(16139,1,12,262),(16148,1,12,281),(16144,1,12,282),(16147,1,12,283),(16150,1,12,286),(16029,1,12,300),(16030,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(16167,1,12,341),(16168,1,12,342),(16169,1,12,343),(16170,1,12,344),(16176,1,12,351),(16173,1,12,352),(16175,1,12,353),(16177,1,12,354),(16179,1,12,358),(16188,1,12,501),(16182,1,12,502),(13865,1,12,510),(16184,1,12,511),(16185,1,12,512),(16187,1,12,514),(16189,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(16156,1,12,531),(16153,1,12,532),(16155,1,12,534),(16157,1,12,538),(13358,1,12,700),(16054,1,12,701),(16053,1,12,702),(16056,1,12,703),(15090,1,12,771),(15081,1,12,772),(15083,1,12,773),(15085,1,12,774),(15087,1,12,775),(15089,1,12,776),(15091,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(14945,1,12,1101),(14943,1,12,1102),(14944,1,12,1104),(14946,1,12,1109),(14762,1,12,1121),(14755,1,12,1122),(14757,1,12,1123),(14759,1,12,1124),(14761,1,12,1125),(14763,1,12,1126),(16082,1,12,1181),(16105,1,12,1182),(16085,1,12,1183),(16086,1,12,1184),(16088,1,12,1185),(16090,1,12,1186),(16092,1,12,1187),(16095,1,12,1188),(16093,1,12,1189),(13827,1,12,1201),(13828,1,12,1202),(16103,1,12,1231),(16098,1,12,1232),(16099,1,12,1233),(16101,1,12,1234),(16102,1,12,1235),(16104,1,12,1236),(16106,1,12,1237),(13829,1,12,1251),(16080,1,12,1321),(16081,1,12,1322),(16048,1,12,1421),(16017,1,12,2401),(16016,1,12,2402),(16019,1,12,2403),(16025,1,12,2411),(16024,1,12,2412),(16027,1,12,2413),(16028,1,12,2414),(16060,1,12,2501),(16059,1,12,2503),(16061,1,12,2515),(16190,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(16121,1,12,20001),(16111,1,12,20002),(16114,1,12,20003),(16117,1,12,20004),(16120,1,12,20005),(16123,1,12,20006),(16036,1,12,23001),(16033,1,12,23002),(16035,1,12,23003),(16037,1,12,23004),(13712,1,12,50101),(15499,1,12,50401),(15501,1,12,50411),(15502,1,12,50412),(15503,1,12,50420),(15504,1,12,50430),(15498,1,12,50440),(16125,1,12,55001),(16126,1,12,55002),(14128,1,12,59001),(14129,1,12,59002),(14130,1,12,59003),(14818,1,12,63001),(14815,1,12,63002),(14817,1,12,63003),(14819,1,12,63004),(15241,1,12,64001),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(15438,1,12,101701),(15439,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); +INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(16272,1,12,11),(16262,1,12,12),(16264,1,12,13),(16266,1,12,14),(16268,1,12,15),(16271,1,12,16),(16274,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(16242,1,12,81),(16236,1,12,82),(16237,1,12,84),(16238,1,12,86),(16240,1,12,87),(16241,1,12,88),(16243,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(14939,1,12,101),(14935,1,12,102),(14936,1,12,104),(14937,1,12,105),(14938,1,12,106),(14940,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(16331,1,12,121),(16327,1,12,122),(16330,1,12,125),(16333,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(16374,1,12,251),(16355,1,12,252),(16357,1,12,253),(16358,1,12,254),(16360,1,12,255),(16362,1,12,256),(16335,1,12,262),(16344,1,12,281),(16340,1,12,282),(16343,1,12,283),(16346,1,12,286),(16225,1,12,300),(16226,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(16363,1,12,341),(16364,1,12,342),(16365,1,12,343),(16366,1,12,344),(16372,1,12,351),(16369,1,12,352),(16371,1,12,353),(16373,1,12,354),(16375,1,12,358),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(16380,1,12,511),(16381,1,12,512),(16383,1,12,514),(16385,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(16352,1,12,531),(16349,1,12,532),(16351,1,12,534),(16353,1,12,538),(13358,1,12,700),(16250,1,12,701),(16249,1,12,702),(16252,1,12,703),(15090,1,12,771),(15081,1,12,772),(15083,1,12,773),(15085,1,12,774),(15087,1,12,775),(15089,1,12,776),(15091,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(14945,1,12,1101),(14943,1,12,1102),(14944,1,12,1104),(14946,1,12,1109),(14762,1,12,1121),(14755,1,12,1122),(14757,1,12,1123),(14759,1,12,1124),(14761,1,12,1125),(14763,1,12,1126),(16278,1,12,1181),(16301,1,12,1182),(16281,1,12,1183),(16282,1,12,1184),(16284,1,12,1185),(16286,1,12,1186),(16288,1,12,1187),(16291,1,12,1188),(16289,1,12,1189),(13827,1,12,1201),(13828,1,12,1202),(16299,1,12,1231),(16294,1,12,1232),(16295,1,12,1233),(16297,1,12,1234),(16298,1,12,1235),(16300,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(16276,1,12,1321),(16277,1,12,1322),(16244,1,12,1421),(16213,1,12,2401),(16212,1,12,2402),(16215,1,12,2403),(16221,1,12,2411),(16220,1,12,2412),(16223,1,12,2413),(16224,1,12,2414),(16256,1,12,2501),(16255,1,12,2503),(16257,1,12,2515),(16386,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(16317,1,12,20001),(16307,1,12,20002),(16310,1,12,20003),(16313,1,12,20004),(16316,1,12,20005),(16319,1,12,20006),(16232,1,12,23001),(16229,1,12,23002),(16231,1,12,23003),(16233,1,12,23004),(13712,1,12,50101),(15499,1,12,50401),(15501,1,12,50411),(15502,1,12,50412),(15503,1,12,50420),(15504,1,12,50430),(15498,1,12,50440),(16321,1,12,55001),(16322,1,12,55002),(14128,1,12,59001),(14129,1,12,59002),(14130,1,12,59003),(14818,1,12,63001),(14815,1,12,63002),(14817,1,12,63003),(14819,1,12,63004),(15241,1,12,64001),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(15438,1,12,101701),(15439,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -9578,15 +9842,15 @@ DROP TABLE IF EXISTS `llx_usergroup`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_usergroup` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `nom` varchar(255) NOT NULL, + `nom` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT '1', `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `note` text, - `model_pdf` varchar(255) DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_usergroup_name` (`nom`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9610,10 +9874,10 @@ CREATE TABLE `llx_usergroup_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_usergroup_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9641,7 +9905,7 @@ CREATE TABLE `llx_usergroup_rights` ( UNIQUE KEY `uk_usergroup_rights` (`entity`,`fk_usergroup`,`fk_id`), KEY `fk_usergroup_rights_fk_usergroup` (`fk_usergroup`), CONSTRAINT `fk_usergroup_rights_fk_usergroup` FOREIGN KEY (`fk_usergroup`) REFERENCES `llx_usergroup` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9672,7 +9936,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=14 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9695,20 +9959,20 @@ DROP TABLE IF EXISTS `llx_website`; CREATE TABLE `llx_website` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT '1', - `ref` varchar(128) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, + `ref` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, `fk_default_home` int(11) DEFAULT NULL, - `virtualhost` varchar(255) DEFAULT NULL, + `virtualhost` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_modification` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_create` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_ref` (`ref`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9827,27 +10091,27 @@ DROP TABLE IF EXISTS `llx_website_page`; CREATE TABLE `llx_website_page` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_website` int(11) NOT NULL, - `pageurl` varchar(255) DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `keywords` varchar(255) DEFAULT NULL, - `content` mediumtext, + `pageurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `content` mediumtext COLLATE utf8_unicode_ci, `status` int(11) DEFAULT '1', `date_creation` datetime DEFAULT NULL, `date_modification` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_user_create` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `type_container` varchar(16) NOT NULL DEFAULT 'page', - `lang` varchar(6) DEFAULT NULL, + `type_container` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'page', + `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_page` int(11) DEFAULT NULL, - `grabbed_from` varchar(255) DEFAULT NULL, - `htmlheader` mediumtext, - `import_key` varchar(14) DEFAULT NULL, + `grabbed_from` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `htmlheader` mediumtext COLLATE utf8_unicode_ci, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_page_url` (`fk_website`,`pageurl`), CONSTRAINT `fk_website_page_website` FOREIGN KEY (`fk_website`) REFERENCES `llx_website` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9868,4 +10132,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2018-01-19 11:30:56 +-- Dump completed on 2018-03-16 11:18:15 diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index 64c5ddeb24d..981ff964b8e 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -15,7 +15,7 @@ * 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 */ @@ -92,7 +92,7 @@ if ($connection) { if (! @ssh2_auth_password($connection, $login, $password)) { - dol_syslog("Could not authenticate with username ".$login." . and password ".$password,LOG_ERR); + dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password),LOG_ERR); exit(-5); } else diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index e5485b280ae..a43e4dde82b 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -10,6 +10,7 @@ htdocs/conf.php */nltechno* */htdocs/includes + *.min.css @@ -82,7 +83,7 @@ - + @@ -138,9 +139,7 @@ - - 0 - + @@ -156,8 +155,8 @@ - - + + diff --git a/dev/tools/github_authors_peryear.sh b/dev/tools/github_authors_peryear.sh index 99b28d4d417..1f3a7fea5f6 100755 --- a/dev/tools/github_authors_peryear.sh +++ b/dev/tools/github_authors_peryear.sh @@ -1,7 +1,13 @@ #!/bin/sh -FROM=2016-01-01 -TO=2016-12-31 +if [ "x$1" = "x" ]; then + echo "Usage: $0 YEAR" + exit +fi + + +FROM=$1-01-01 +TO=$1-12-31 echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l" git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l diff --git a/dev/tools/github_commits_perversion.sh b/dev/tools/github_commits_perversion.sh index 40ddafee617..bf76e68bc43 100755 --- a/dev/tools/github_commits_perversion.sh +++ b/dev/tools/github_commits_perversion.sh @@ -1,10 +1,11 @@ #/bin/bash -Releases=("3.8" "3.9" "4.0" "5.0", "develop") -Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01") +Releases=("3.8" "3.9" "4.0" "5.0" "6.0" " 7.0" "develop") +Dates=("2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01", "2017-02-01", "2017-07-01", "2018-02-01", "2050-01-01") let "counter = 1" for i in "${Releases[@]}" do + echo "=== $counter git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}" git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]} echo -n "Total $i: " git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l diff --git a/dev/tools/test/testtcpdf.php b/dev/tools/test/testtcpdf.php index ad67bce8af9..e14dae9c2a3 100755 --- a/dev/tools/test/testtcpdf.php +++ b/dev/tools/test/testtcpdf.php @@ -101,7 +101,7 @@ $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); //set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); +$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); diff --git a/dev/tools/test/testutf.php b/dev/tools/test/testutf.php index cb83f431b93..c626a92a57d 100644 --- a/dev/tools/test/testutf.php +++ b/dev/tools/test/testutf.php @@ -76,7 +76,7 @@ $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); //set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); +$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); //set image scale factor //$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); diff --git a/dev/translation/txpush.sh b/dev/translation/txpush.sh index f64b60f9d3b..339b24d2c30 100755 --- a/dev/translation/txpush.sh +++ b/dev/translation/txpush.sh @@ -15,7 +15,7 @@ then 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|all) [-r ".$project.".file] [-f] [--no-interactive]" + echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r $project.file] [-f] [--no-interactive]" exit fi diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 98ecd8e327c..493c9e62717 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2017 Alexandre Spangaro - * Copyright (C) 2016-2017 Laurent Destailleur + * Copyright (C) 2016-2018 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 @@ -28,18 +28,15 @@ 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/accountingaccount.class.php'; -// Langs -$langs->load("compta"); -$langs->load("bills"); -$langs->load("admin"); -$langs->load("accountancy"); -$langs->load("salaries"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","admin","accountancy","salaries")); $mesg = ''; $action = GETPOST('action','aZ09'); $cancel = GETPOST('cancel','alpha'); $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'int'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist'; // To manage different context of search $search_account = GETPOST("search_account"); $search_label = GETPOST("search_label"); @@ -74,8 +71,6 @@ $arrayfields=array( $accounting = new AccountingAccount($db); -// Initialize technical object to manage context to save list fields -$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist'; /* @@ -176,12 +171,11 @@ $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 .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version"; -// Dirty hack wainting that foreign key account_parent is an integer to be compared correctly with rowid -if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS INTEGER)"; -else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED)"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = " . $conf->entity; +if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity; +else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity; $sql .= " WHERE asy.rowid = " . $pcgver; - +//print $sql; if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account); if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label); if (strlen(trim($search_accountparent))) $sql .= natural_search("aa.account_parent", $search_accountparent); @@ -195,6 +189,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); @@ -227,9 +226,11 @@ if ($resql) print ''; print ''; - $htmlbuttonadd = '' . $langs->trans("Addanaccount") . ''; + $newcardbutton = '' . $langs->trans("Addanaccount").''; + $newcardbutton.= ''; + $newcardbutton.= ''; - print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit); + print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); // Box to select active chart of account print $langs->trans("Selectchartofaccounts") . " : "; @@ -257,7 +258,7 @@ if ($resql) else dol_print_error($db); print ""; print ajax_combobox("chartofaccounts"); - print ''; + print ''; print '
'; print '
'; @@ -276,7 +277,7 @@ if ($resql) if (! empty($arrayfields['aa.pcg_type']['checked'])) print ''; if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print ''; if (! empty($arrayfields['aa.active']['checked'])) print ' '; - print ''; + print ''; $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); print $searchpicto; print ''; @@ -310,7 +311,7 @@ if ($resql) if (! empty($arrayfields['aa.account_number']['checked'])) { print ""; - print $accountstatic->getNomUrl(1); + print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1); print "\n"; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index f3924f73a76..f024f54c41c 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel @@ -41,11 +41,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; +// Load translation files required by the page $langs->loadLangs(array("errors","admin","companies","resource","holiday","compta","accountancy","hrm")); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $confirm=GETPOST('confirm','alpha'); -$id=GETPOST('id','int'); +$id=31; $rowid=GETPOST('rowid','alpha'); $code=GETPOST('code','alpha'); @@ -58,8 +59,8 @@ $listoffset=GETPOST('listoffset'); $listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000; $active = 1; -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); +$sortfield = GETPOST("sortfield",'aZ09comma'); +$sortorder = GETPOST("sortorder",'aZ09comma'); $page = GETPOST("page",'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $listlimit * $page ; @@ -84,59 +85,48 @@ $hookmanager->initHooks(array('admin')); $tabname=array(); $tabname[31]= MAIN_DB_PREFIX."accounting_system"; -$tabname[32]= MAIN_DB_PREFIX."c_accounting_category"; // Dictionary labels $tablib=array(); $tablib[31]= "Pcg_version"; -$tablib[32]= "DictionaryAccountancyCategory"; // Requests to extract data $tabsql=array(); $tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.fk_country as country_id, c.code as country_code, c.label as country, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_country as c WHERE s.fk_country=c.rowid and c.active=1"; -$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1"; // Criteria to sort dictionaries $tabsqlsort=array(); $tabsqlsort[31]="pcg_version ASC"; -$tabsqlsort[32]="position ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield=array(); $tabfield[31]= "pcg_version,label,country_id,country"; -$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue=array(); $tabfieldvalue[31]= "pcg_version,label,country"; -$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); $tabfieldinsert[31]= "pcg_version,label,fk_country"; -$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country"; // 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[31]= ""; -$tabrowid[32]= ""; // Condition to show dictionary in setup page $tabcond=array(); $tabcond[31]= ! empty($conf->accounting->enabled); -$tabcond[32]= ! empty($conf->accounting->enabled); // List of help for fields $tabhelp=array(); $tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode")); -$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode")); // List of check for fields (NOT USED YET) $tabfieldcheck=array(); $tabfieldcheck[31] = array(); -$tabfieldcheck[32] = array(); // Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact") @@ -484,7 +474,7 @@ 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.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.urlencode($page).'&':'').'sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder).'&rowid='.urlencode($rowid).'&code='.urlencode($code).'&id='.urlencode($id), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -503,24 +493,9 @@ if ($id) $sql.= " c.rowid = ".$search_country_id; } - if ($sortfield) - { - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield='country_code'; - $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]; + // If sort order is "country", we use country_code instead + if ($sortfield == 'country') $sortfield='country_code'; + $sql.=$db->order($sortfield,$sortorder); $sql.=$db->plimit($listlimit+1,$offset); //print $sql; @@ -643,25 +618,13 @@ if ($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') - { - fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide'); - } - else - { - fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add'); - } + fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add'); } print ''; - if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit') - { - print ''; - } + print ''; print ''; print ""; @@ -683,7 +646,6 @@ if ($id) { $num = $db->num_rows($resql); $i = 0; - $var=true; $param = '&id='.$id; if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id; @@ -880,7 +842,7 @@ if ($id) $valuetoshow=price($valuetoshow); } else if ($fieldlist[$field]=='libelle_facture') { - $langs->load("bills"); + $langs->loadLangs(array("bills")); $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); $valuetoshow=nl2br($valuetoshow); @@ -890,7 +852,7 @@ if ($id) $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"); + $langs->loadLangs(array("propal")); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } @@ -915,17 +877,17 @@ if ($id) $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'); + $langs->loadLangs(array("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"); + $langs->loadLangs(array("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"); + $langs->loadLangs(array("bills")); $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } @@ -934,12 +896,12 @@ if ($id) $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"); + $langs->loadLangs(array("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"); + $langs->loadLangs(array("sendings")); $key=$langs->trans("SendingMethod".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } @@ -950,7 +912,7 @@ if ($id) } else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { - $langs->load('trips'); + $langs->loadLangs(array("trips")); $key = $langs->trans(strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); } @@ -961,11 +923,11 @@ if ($id) $valuetoshow = $langs->getCurrencySymbol($obj->code,1); } else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); + $langs->loadLangs(array("products")); $valuetoshow=$langs->trans($obj->{$fieldlist[$field]}); } else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); + $langs->loadLangs(array("products")); $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); } else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) @@ -1013,13 +975,7 @@ if ($id) // Active print ''; if ($canbedisabled) print ''.$actl[$obj->active].''; - else - { - if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); - else print $langs->trans("AlwaysActive"); - } + else print $langs->trans("AlwaysActive"); print ""; // Modify link @@ -1068,7 +1024,6 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') global $form; global $region_id; global $elementList,$sourceList; - global $bc; $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); @@ -1168,16 +1123,11 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') } 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 ''; + print ''; if ($context != 'hide') { //print ''; $okforextended=true; - if ($tabname == MAIN_DB_PREFIX.'c_email_templates' && empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended=false; $doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_5, '90%'); print $doleditor->Create(1); } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 82ba00a882c..9643227da64 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; $error = 0; -// Langs -$langs->load("bills"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("bills","accountancy")); $mesg = ''; $action = GETPOST('action','aZ09'); @@ -188,12 +187,10 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) } } + /* * View */ -$title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card'); -$helpurl = ''; -llxheader('', $title, $helpurl); $form = new Form($db); $formaccounting = new FormAccounting($db); @@ -201,6 +198,11 @@ $formaccounting = new FormAccounting($db); $accountsystem = new AccountancySystem($db); $accountsystem->fetch($conf->global->CHARTOFACCOUNTS); +$title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card'); +$helpurl = ''; +llxheader('', $title, $helpurl); + + // Create mode if ($action == 'create') { print load_fiche_titre($langs->trans('NewAccountingAccount')); @@ -330,7 +332,7 @@ else if ($id > 0 || $ref) { print ''; } else { // View mode - $linkback = '' . $langs->trans("BackToList") . ''; + $linkback = '' . $langs->trans("BackToList") . ''; dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr'); @@ -397,4 +399,4 @@ else if ($id > 0 || $ref) { llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 7ab463e3179..aec34469559 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; $error = 0; -$langs->load("bills"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("bills","accountancy")); $mesg = ''; $id = GETPOST('id', 'int'); @@ -53,6 +53,11 @@ if (empty($user->rights->accounting->chartofaccount)) $accountingcategory = new AccountancyCategory($db); + +/* + * Actions + */ + // si ajout de comptes if (! empty($selectcpt)) { $cpts = array (); @@ -66,7 +71,7 @@ if (! empty($selectcpt)) { if ($return<0) { setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors'); } else { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); } } if ($action == 'delete') { @@ -83,12 +88,13 @@ if ($action == 'delete') { /* * View */ + $form = new Form($db); $formaccounting = new FormAccounting($db); llxheader('', $langs->trans('AccountingCategory')); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; print load_fiche_titre($langs->trans('AccountingCategory'), $linkback); @@ -99,13 +105,15 @@ print ''; dol_fiche_head(); print ''; -// Category + +// Select the category print ''; print ''; +// Select the accounts if (! empty($cat_id)) { $return = $accountingcategory->getAccountsWithNoCategory($cat_id); @@ -153,7 +161,7 @@ if ($action == 'display' || $action == 'delete') { print "\n"; if (! empty($cat_id)) { - $return = $accountingcategory->display($cat_id); + $return = $accountingcategory->display($cat_id); // This load ->lines_display if ($return < 0) { setEventMessages(null, $accountingcategory->errors, 'errors'); } diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 0dcefdcc0ee..15a50e7b8e8 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +// Load translation files required by the page $langs->loadLangs(array("errors","admin","companies","resource","holiday","accountancy","hrm")); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; @@ -54,8 +55,8 @@ $listoffset=GETPOST('listoffset'); $listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000; $active = 1; -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); +$sortfield = GETPOST("sortfield",'aZ09comma'); +$sortorder = GETPOST("sortorder",'aZ09comma'); $page = GETPOST("page",'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $listlimit * $page ; @@ -152,7 +153,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) { if ($value == 'formula' && empty($_POST['formula'])) continue; if ($value == 'range_account' && empty($_POST['range_account'])) continue; - if ($value == 'country') continue; // country_id required but not country + if ($value == 'country' || $value == 'country_id') continue; if (! isset($_POST[$value]) || $_POST[$value]=='') { $ok=0; @@ -175,16 +176,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=0; setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors'); } - /*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base - { - $ok = 0; - $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
'; - }*/ } - if (isset($_POST["country"]) && ($_POST["country"] <= 0)) + if (! is_numeric(GETPOST('position','alpha'))) { - $ok=0; - setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors'); + $langs->loadLangs(array("errors")); + $ok=0; + setEventMessages($langs->transnoentities('ErrorFieldMustBeANumeric', $langs->transnoentities("Position")), null, 'errors'); } // Clean some parameters @@ -193,7 +190,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null // Si verif ok et action add, on ajoute la ligne - if ($ok && GETPOST('actionadd')) + if ($ok && GETPOST('actionadd','alpha')) { if ($tabrowid[$id]) { @@ -214,15 +211,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) // Add new entry $sql = "INSERT INTO ".$tabname[$id]." ("; // List of fields - if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) - $sql.= $tabrowid[$id].","; + if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) $sql.= $tabrowid[$id].","; $sql.= $tabfieldinsert[$id]; $sql.=",active)"; $sql.= " VALUES("; // List of values - if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) - $sql.= $newid.","; + if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) $sql.= $newid.","; $i=0; foreach ($listfieldinsert as $f => $value) { @@ -306,7 +301,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } else { $rowidcol="rowid"; } - $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; + $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); @@ -330,10 +325,10 @@ if ($action == $acts[0]) else { $rowidcol="rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; } elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code = '".$db->escape($code)."'"; } $result = $db->query($sql); @@ -350,10 +345,10 @@ if ($action == $acts[1]) else { $rowidcol="rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; } elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code = '".$db->escape($code)."'"; } $result = $db->query($sql); @@ -370,10 +365,10 @@ if ($action == 'activate_favorite') else { $rowidcol="rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; } elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code = '".$db->escape($code)."'"; } $result = $db->query($sql); @@ -390,10 +385,10 @@ if ($action == 'disable_favorite') else { $rowidcol="rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; } elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code = '".$db->escape($code)."'"; } $result = $db->query($sql); @@ -440,27 +435,12 @@ if ($id) { if (preg_match('/ WHERE /',$sql)) $sql.= " AND "; else $sql.=" WHERE "; - $sql.= " c.rowid = ".$search_country_id; + $sql.= " (a.fk_country = ".$search_country_id." OR a.fk_country = 0)"; } - if ($sortfield) - { - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield='country_code'; - $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]; + // If sort order is "country", we use country_code instead + if ($sortfield == 'country') $sortfield='country_code'; + $sql.=$db->order($sortfield,$sortorder); $sql.=$db->plimit($listlimit+1,$offset); //print $sql; @@ -477,7 +457,6 @@ if ($id) if ($tabname[$id]) { $alabelisused=0; - $var=false; $fieldlist=explode(',',$tabfield[$id]); @@ -571,7 +550,6 @@ if ($id) { $num = $db->num_rows($resql); $i = 0; - $var=true; $param = '&id='.$id; if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id; @@ -741,7 +719,7 @@ if ($id) $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"); + $langs->loadLangs(array("propal")); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } @@ -799,7 +777,7 @@ if ($id) print ''; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index ec1b20b15e9..e39d07fc35d 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -27,16 +27,13 @@ * \ingroup Advanced accountancy * \brief Setup page to configure accounting expert module */ -require '../../main.inc.php'; -// Class +require '../../main.inc.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"); -$langs->load("admin"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","admin","accountancy")); // Security access if (empty($user->rights->accounting->chartofaccount)) @@ -65,39 +62,23 @@ $accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : if ($action == 'update') { $error = 0; - $accounting_modes = array ( - 'RECETTES-DEPENSES', - 'CREANCES-DETTES' - ); + if (! $error) + { + foreach ($list as $constname) + { + $constvalue = GETPOST($constname, 'alpha'); - $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 ++; + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } - if ($error) { - setEventMessages($langs->trans("Error"), null, 'errors'); - } - - foreach ($list 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'); } } @@ -151,6 +132,18 @@ if ($action == 'setdisabledirectinput') { } } +if ($action == 'setenabledraftexport') { + $setenabledraftexport = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity); + if (! $res > 0) + $error ++; + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + /* * View */ @@ -232,6 +225,19 @@ if (! empty($user->admin)) } print ''; + print ''; + print ''; + if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { + print ''; + } else { + print ''; + } + print ''; + print ''; print ''; if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 7612e7b261a..4a5e77a434b 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -30,13 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -$langs->load("admin"); -$langs->load("compta"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("admin","compta","accountancy")); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $confirm=GETPOST('confirm','alpha'); -$id=GETPOST('id','int'); +$id=35; $rowid=GETPOST('rowid','alpha'); $code=GETPOST('code','alpha'); @@ -135,6 +134,7 @@ $elementList = array(); '3' => $langs->trans('AccountingJournalType3'), '4' => $langs->trans('AccountingJournalType4'), '5' => $langs->trans('AccountingJournalType5'), + '8' => $langs->trans('AccountingJournalType8'), '9' => $langs->trans('AccountingJournalType9') ); @@ -400,24 +400,9 @@ if ($id) $sql=$tabsql[$id]; $sql.= " WHERE a.entity = ".$conf->entity; - if ($sortfield) - { - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield='country_code'; - $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]; + // If sort order is "country", we use country_code instead + if ($sortfield == 'country') $sortfield='country_code'; + $sql.=$db->order($sortfield,$sortorder); $sql.=$db->plimit($listlimit+1,$offset); $fieldlist=explode(',',$tabfield[$id]); @@ -433,7 +418,6 @@ if ($id) if ($tabname[$id]) { $alabelisused=0; - $var=false; $fieldlist=explode(',',$tabfield[$id]); @@ -513,7 +497,6 @@ if ($id) { $num = $db->num_rows($resql); $i = 0; - $var=true; $param = '&id='.$id; if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id; @@ -618,6 +601,7 @@ if ($id) if (empty($reshook)) { + $langs->load("accountancy"); foreach ($fieldlist as $field => $value) { @@ -628,10 +612,12 @@ if ($id) $valuetoshow=$langs->trans('All'); } else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { - $langs->load("accountancy"); $key=$langs->trans("AccountingJournalType".strtoupper($obj->nature)); - $valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]}); + $valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]}); } + else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { + $valuetoshow=$langs->trans($obj->label); + } $class='tddict'; // Show value for field @@ -657,13 +643,7 @@ if ($id) // Active print '"; // Modify link diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e07d0c24771..070e2f353c3 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -26,7 +26,6 @@ */ require '../../main.inc.php'; -// Class require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; @@ -35,12 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; -// Langs -$langs->load("companies"); -$langs->load("compta"); -$langs->load("main"); -$langs->load("accountancy"); -$langs->load("products"); +// Load translation files required by the page +$langs->loadLangs(array("companies","compta","accountancy","products")); // Security check if (empty($conf->accounting->enabled)) { @@ -261,7 +256,13 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } + $sql .= $db->plimit($limit + 1, $offset); dol_syslog("/accountancy/admin/productaccount.php:: sql=" . $sql, LOG_DEBUG); @@ -272,8 +273,8 @@ if ($result) $i = 0; $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($search_ref > 0) $param.="&search_desc=".urlencode($search_ref); if ($search_label > 0) $param.="&search_desc=".urlencode($search_label); if ($search_desc > 0) $param.="&search_desc=".urlencode($search_desc); @@ -300,10 +301,10 @@ if ($result) print ''; print ''; print "\n"; - print ''; + print ''; print '\n"; - print ''; + print ''; print '\n"; print "
' . $langs->trans("AccountingCategory") . ''; $formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1); print ''; print '
'; if (empty($obj->formula)) { - print ''; + print ''; print $langs->trans("ListOfAccounts"); print ''; } diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index c4b31c0f169..c33d4326836 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -34,12 +34,8 @@ 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/class/html.formaccounting.class.php'; -$langs->load("compta"); -$langs->load("bills"); -$langs->load("admin"); -$langs->load("accountancy"); -$langs->load("salaries"); -$langs->load("loan"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","admin","accountancy","salaries","loan")); // Security check if (empty($user->rights->accounting->chartofaccount)) diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index dbe2a3b0c1c..79588db5ac1 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -28,15 +28,12 @@ */ 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 . '/accountancy/class/accountancyexport.class.php'; -$langs->load("compta"); -$langs->load("bills"); -$langs->load("admin"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","admin","accountancy")); // Security access if (empty($user->rights->accounting->chartofaccount)) diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 147c140bdd1..25223e70c68 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -39,8 +39,8 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.rowid"; // Set here default search field if (! $sortorder) $sortorder="ASC"; -$langs->load("admin"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array("admin","compta")); // Security check if ($user->societe_id > 0) @@ -95,6 +95,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -153,4 +158,4 @@ if ($result) llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 78c6510469b..32df9afc932 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -26,8 +26,8 @@ require '../../main.inc.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"); +// Load translation files required by the page +$langs->loadLangs(array("admin","compta")); // Security check if ($user->societe_id > 0) diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index baadbdc0828..f16e3b9ca0e 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -26,8 +26,8 @@ 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"); +// Load translation files required by the page +$langs->loadLangs(array("admin","compta")); // Security check if ($user->societe_id > 0) diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index 93d41b3cbc6..3af46eec1a4 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -24,16 +24,12 @@ */ 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 . '/core/class/html.formaccounting.class.php'; -// langs -$langs->load("compta"); -$langs->load("bills"); -$langs->load("main"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","accountancy")); // Security check if (! $user->admin) @@ -141,7 +137,6 @@ if ($result) { $form = new Form($db); $formaccounting = new FormAccounting($db); - $var = true; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); print '
' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . ''; if ($canbedisabled) print ''.$actl[$obj->active].''; - else - { - if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); - else print $langs->trans("AlwaysActive"); - } + else print $langs->trans("AlwaysActive"); print "
' . $langs->trans('Options') . '' . $langs->trans('Description') . '
' . $langs->trans('OptionModeProductSell') . '
' . $langs->trans('OptionModeProductSell') . ''.$langs->trans('OptionModeProductSellDesc'); print "
' . $langs->trans('OptionModeProductBuy') . '
' . $langs->trans('OptionModeProductBuy') . ''.$langs->trans('OptionModeProductBuyDesc')."
\n"; @@ -328,9 +329,9 @@ if ($result) print ''; if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ''; // On sell - print ''; + if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print ''; // On buy - print ''; + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print ''; // Current account print ''; print ''; @@ -348,11 +349,9 @@ if ($result) print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder); - if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { - $fieldtosortaccount="p.accountancy_code_buy"; - } + if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder); + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder); + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy"; else $fieldtosortaccount="p.accountancy_code_sell"; print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AssignDedicatedAccountingAccount"); @@ -362,7 +361,6 @@ if ($result) $product_static = new Product($db); - $var = true; $i=0; while ($i < min($num,$limit)) { @@ -410,9 +408,11 @@ if ($result) print '' . nl2br(dol_trunc($obj->description, $trunclengh)) . ''; } - print ''.$product_static->getLibStatut(3, 0).''; + if ($accounting_product_mode == 'ACCOUNTANCY_SELL') + print ''.$product_static->getLibStatut(3, 0).''; - print ''.$product_static->getLibStatut(3, 1).''; + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') + print ''.$product_static->getLibStatut(3, 1).''; // Current accounting account print ''; @@ -496,4 +496,4 @@ if ($result) } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 15e7acd7deb..f9cf6eec5e5 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ - * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2017 Alexandre Spangaro +/* Copyright (C) 2016 Olivier Geffroy + * Copyright (C) 2016 Florian Henry + * Copyright (C) 2016-2018 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 @@ -34,8 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; -// Langs -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("accountancy")); $page = GETPOST("page"); $sortorder = GETPOST("sortorder"); @@ -138,8 +138,7 @@ if ($action == 'export_csv') { $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; - $journal = 'balance'; - + $filename = 'balance'; include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; $result = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter); @@ -153,7 +152,6 @@ if ($action == 'export_csv') { print $object->get_compte_desc($line->numero_compte) . $sep; print price($line->debit) . $sep; print price($line->credit) . $sep; - print price($line->debit) . $sep; print price($line->credit - $line->debit) . $sep; print "\n"; } @@ -188,7 +186,7 @@ else { print ''; print ''; - $button = 'global->ACCOUNTING_EXPORT_FORMAT.')" />'; + $button = 'global->ACCOUNTING_EXPORT_FORMAT.')" />'; print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button); $moreforfilter = ''; @@ -254,8 +252,8 @@ else { print ''; // Permet d'afficher le compte comptable - if ($root_account_description != $displayed_account) { - + if (empty($displayed_account) || $root_account_description != $displayed_account) + { // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { print '' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price($sous_total_credit - $sous_total_debit) . ''; @@ -263,9 +261,9 @@ else { print ''; } - // Affiche le compte comptable en d�but de ligne + // Affiche le compte comptable en debut de ligne print ""; - print '' . $root_account_description . ''; + print '' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . ''; print ''; $displayed_account = $root_account_description; diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index 1d746b4d4df..03265e434f6 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -26,16 +26,11 @@ */ 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'; -// Langs -$langs->load("main"); -$langs->load("compta"); -$langs->load("bills"); -$langs->load("other"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("bills","compta","accountancy","other")); // Filter $year = GETPOST("year",'int'); @@ -75,10 +70,23 @@ if ($result) { $y = $year_current; -$var = true; - print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; $sql = "SELECT bk.numero_compte AS 'compte',"; $sql .= " ROUND(SUM(IF(MONTH(bk.doc_date)=1,bk.montant,0)),2) AS 'Janvier',"; @@ -108,7 +116,7 @@ if ($resql) { $row = $db->fetch_row($resql); - print ''; + print ''; print ''; print ''; print ''; @@ -133,4 +141,4 @@ if ($resql) { print "
' . $langs->trans("Label") . '' . $langs->trans("JanuaryMin") . '' . $langs->trans("FebruaryMin") . '' . $langs->trans("MarchMin") . '' . $langs->trans("AprilMin") . '' . $langs->trans("MayMin") . '' . $langs->trans("JuneMin") . '' . $langs->trans("JulyMin") . '' . $langs->trans("AugustMin") . '' . $langs->trans("SeptemberMin") . '' . $langs->trans("OctoberMin") . '' . $langs->trans("NovemberMin") . '' . $langs->trans("DecemberMin") . 'Total
' . $langs->trans("Label") . '' . $langs->trans("JanuaryMin") . '' . $langs->trans("FebruaryMin") . '' . $langs->trans("MarchMin") . '' . $langs->trans("AprilMin") . '' . $langs->trans("MayMin") . '' . $langs->trans("JuneMin") . '' . $langs->trans("JulyMin") . '' . $langs->trans("AugustMin") . '' . $langs->trans("SeptemberMin") . '' . $langs->trans("OctoberMin") . '' . $langs->trans("NovemberMin") . '' . $langs->trans("DecemberMin") . 'Total
' . length_accountg($row[0]) . '
' . length_accountg($row[0]) . '' . price($row[1]) . '' . price($row[2]) . '' . price($row[3]) . '
\n"; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index f0042f962bb..10b3b5434fd 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,8 +1,8 @@ - * Copyright (C) 2013-2017 Florian Henry - * Copyright (C) 2013-2017 Alexandre Spangaro - * Copyright (C) 2017 Laurent Destailleur +/* Copyright (C) 2013-2017 Olivier Geffroy + * Copyright (C) 2013-2017 Florian Henry + * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2017 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 @@ -32,30 +32,31 @@ require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("accountancy"); -$langs->load("bills"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array("accountancy", "bills", "compta")); + +$action = GETPOST('action','aZ09'); + +$id = GETPOST('id', 'int'); // id of record +$mode = GETPOST('mode','aZ09'); // '' or 'tmp' +$piece_num = GETPOST("piece_num",'int'); // id of transaction (several lines share the same transaction id) // Security check -$id = GETPOST('id', 'int'); if ($user->societe_id > 0) { accessforbidden(); } -$action = GETPOST('action','aZ09'); -$mode = GETPOST('mode','aZ09'); // '' or 'tmp' -$piece_num = GETPOST("piece_num"); $mesg = ''; -$account_number = GETPOST('account_number'); -$subledger_account = GETPOST('subledger_account'); +$account_number = GETPOST('account_number','alphanohtml'); +$subledger_account = GETPOST('subledger_account','alphanohtml'); if ($subledger_account == - 1) { $subledger_account = null; } -$label_compte = GETPOST('label_compte'); -$label_operation= GETPOST('label_operation'); -$debit = price2num(GETPOST('debit')); -$credit = price2num(GETPOST('credit')); +$label_compte = GETPOST('label_compte','alphanohtml'); +$label_operation= GETPOST('label_operation','alphanohtml'); +$debit = price2num(GETPOST('debit','alpha')); +$credit = price2num(GETPOST('credit','alpha')); $save = GETPOST('save','alpha'); if (! empty($save)) $action = 'add'; @@ -87,36 +88,36 @@ if ($action == "confirm_update") { if (! $error) { - $book = new BookKeeping($db); + $object = new BookKeeping($db); - $result = $book->fetch($id, null, $mode); + $result = $object->fetch($id, null, $mode); if ($result < 0) { $error++; - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { - $book->numero_compte = $account_number; - $book->subledger_account = $subledger_account; - $book->label_compte = $label_compte; - $book->label_operation= $label_operation; - $book->debit = $debit; - $book->credit = $credit; + $object->numero_compte = $account_number; + $object->subledger_account = $subledger_account; + $object->label_compte = $label_compte; + $object->label_operation= $label_operation; + $object->debit = $debit; + $object->credit = $credit; if (floatval($debit) != 0.0) { - $book->montant = $debit; - $book->sens = 'D'; + $object->montant = $debit; + $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $book->montant = $credit; - $book->sens = 'C'; + $object->montant = $credit; + $object->sens = 'C'; } - $result = $book->update($user, false, $mode); + $result = $object->update($user, false, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $debit = 0; @@ -145,39 +146,39 @@ else if ($action == "add") { } if (! $error) { - $book = new BookKeeping($db); + $object = new BookKeeping($db); - $book->numero_compte = $account_number; - $book->subledger_account = $subledger_account; - $book->label_compte = $label_compte; - $book->label_operation= $label_operation; - $book->debit = $debit; - $book->credit = $credit; - $book->doc_date = GETPOST('doc_date'); - $book->doc_type = GETPOST('doc_type'); - $book->piece_num = $piece_num; - $book->doc_ref = GETPOST('doc_ref'); - $book->code_journal = GETPOST('code_journal'); - $book->fk_doc = GETPOST('fk_doc'); - $book->fk_docdet = GETPOST('fk_docdet'); + $object->numero_compte = $account_number; + $object->subledger_account = $subledger_account; + $object->label_compte = $label_compte; + $object->label_operation= $label_operation; + $object->debit = $debit; + $object->credit = $credit; + $object->doc_date = GETPOST('doc_date','alpha'); + $object->doc_type = GETPOST('doc_type','alpha'); + $object->piece_num = $piece_num; + $object->doc_ref = GETPOST('doc_ref','alpha'); + $object->code_journal = GETPOST('code_journal','alpha'); + $object->fk_doc = GETPOST('fk_doc','alpha'); + $object->fk_docdet = GETPOST('fk_docdet','alpha'); if (floatval($debit) != 0.0) { - $book->montant = $debit; - $book->sens = 'D'; + $object->montant = $debit; + $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $book->montant = $credit; - $book->sens = 'C'; + $object->montant = $credit; + $object->sens = 'C'; } - $result = $book->createStd($user, false, $mode); + $result = $object->createStd($user, false, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $debit = 0; @@ -189,17 +190,17 @@ else if ($action == "add") { } else if ($action == "confirm_delete") { - $book = new BookKeeping($db); + $object = new BookKeeping($db); - $result = $book->fetch($id, null, $mode); - $piece_num = $book->piece_num; + $result = $object->fetch($id, null, $mode); + $piece_num = $object->piece_num; if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { - $result = $book->delete($user, false, $mode); + $result = $object->delete($user, false, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } $action = ''; @@ -208,9 +209,9 @@ else if ($action == "confirm_delete") { else if ($action == "confirm_create") { $error = 0; - $book = new BookKeeping($db); + $object = new BookKeeping($db); - if (! GETPOST('code_journal') || GETPOST('code_journal') == '-1') { + if (! GETPOST('code_journal','alpha') || GETPOST('code_journal','alpha') == '-1') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors'); $action='create'; $error++; @@ -223,29 +224,29 @@ else if ($action == "confirm_create") { if (! $error) { - $book->label_compte = ''; - $book->debit = 0; - $book->credit = 0; - $book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear')); - $book->doc_type = GETPOST('doc_type'); - $book->piece_num = GETPOST('next_num_mvt'); - $book->doc_ref = GETPOST('doc_ref'); - $book->code_journal = GETPOST('code_journal'); - $book->fk_doc = 0; - $book->fk_docdet = 0; - $book->montant = 0; + $object->label_compte = ''; + $object->debit = 0; + $object->credit = 0; + $object->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth','int'), GETPOST('doc_dateday','int'), GETPOST('doc_dateyear','int')); + $object->doc_type = GETPOST('doc_type','alpha'); + $object->piece_num = GETPOST('next_num_mvt','alpha'); + $object->doc_ref = GETPOST('doc_ref','alpha'); + $object->code_journal = GETPOST('code_journal','alpha'); + $object->fk_doc = 0; + $object->fk_docdet = 0; + $object->montant = 0; - $result = $book->createStd($user,0, $mode); + $result = $object->createStd($user,0, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $action = 'update'; - $id=$book->id; - $piece_num = $book->piece_num; + $id=$object->id; + $piece_num = $object->piece_num; } } } @@ -258,35 +259,35 @@ if ($action == 'setdate') { } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $action = ''; } } if ($action == 'setjournal') { - $journaldoc = trim(GETPOST('code_journal')); - $result = $object->updateByMvt($piece_num,'code_journal',$journaldoc,$mode); + $journaldoc = trim(GETPOST('code_journal','alpha')); + $result = $object->updateByMvt($piece_num, 'code_journal', $journaldoc, $mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $action = ''; } } if ($action == 'setdocref') { - $refdoc = trim(GETPOST('doc_ref')); + $refdoc = trim(GETPOST('doc_ref','alpha')); $result = $object->updateByMvt($piece_num,'doc_ref',$refdoc,$mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { if ($mode != '_tmp') { - setEventMessages($langs->trans('Saved'), null, 'mesgs'); + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } $action = ''; } @@ -324,8 +325,8 @@ if ($action == 'create') { print load_fiche_titre($langs->trans("CreateMvts")); - $book = new BookKeeping($db); - $next_num_mvt = $book->getNextNumMvt('_tmp'); + $object = new BookKeeping($db); + $next_num_mvt = $object->getNextNumMvt('_tmp'); if (empty($next_num_mvt)) { @@ -340,13 +341,14 @@ if ($action == 'create') dol_fiche_head(); print ''; - print ''; + + /*print ''; print ''; print ''; - print ''; + print '';*/ print ''; - print ''; + print ''; print ''; @@ -358,7 +360,7 @@ if ($action == 'create') print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -381,28 +383,28 @@ if ($action == 'create') print ''; } else { - $book = new BookKeeping($db); - $result = $book->fetchPerMvt($piece_num, $mode); + $object = new BookKeeping($db); + $result = $object->fetchPerMvt($piece_num, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } - if (! empty($book->piece_num)) + if (! empty($object->piece_num)) { - $backlink = '' . $langs->trans('BackToList') . ''; + $backlink = '' . $langs->trans('BackToList') . ''; print load_fiche_titre($langs->trans("UpdateMvts"), $backlink); $head=array(); $h=0; - $head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$book->piece_num.($mode?'&mode='.$mode:''); + $head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$object->piece_num.($mode?'&mode='.$mode:''); $head[$h][1] = $langs->trans("Transaction"); $head[$h][2] = 'transaction'; $h++; dol_fiche_head($head, 'transaction', '', -1); - //dol_banner_tab($book, '', $backlink); + //dol_banner_tab($object, '', $backlink); print '
'; print '
'; @@ -413,7 +415,7 @@ if ($action == 'create') // Account movement print '
'; print ''; - print ''; + print ''; print ''; // Date @@ -422,19 +424,19 @@ if ($action == 'create') print $langs->trans('Docdate'); print ''; if ($action != 'editdate') - print ''; + print ''; print '
' . $langs->trans("NumPiece") . '' . $next_num_mvt . '
' . $langs->trans("Docdate") . '' . $langs->trans("Docdate") . ''; print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '
' . $langs->trans("Docref") . '' . $langs->trans("Piece") . '
' . $langs->trans("NumMvts") . '' . $book->piece_num . '' . $object->piece_num . '
piece_num .'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'piece_num .'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'
'; print ''; if ($action == 'editdate') { - print '
'; + print ''; print ''; print ''; print ''; - $form->select_date($book->doc_date ? $book->doc_date : - 1, 'doc_date', '', '', '', "setdate"); + $form->select_date($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate"); print ''; print '
'; } else { - print $book->doc_date ? dol_print_date($book->doc_date, 'day') : ' '; + print $object->doc_date ? dol_print_date($object->doc_date, 'day') : ' '; } print ''; print ''; @@ -445,19 +447,19 @@ if ($action == 'create') print $langs->trans('Codejournal'); print ''; if ($action != 'editjournal') - print 'piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).''; + print 'piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).''; print ''; print ''; if ($action == 'editjournal') { - print '
'; + print ''; print ''; print ''; print ''; - print $formaccounting->select_journal($book->code_journal,'code_journal',0,0,array(),1,1); + print $formaccounting->select_journal($object->code_journal,'code_journal',0,0,array(),1,1); print ''; print '
'; } else { - print $book->code_journal ; + print $object->code_journal ; } print ''; print ''; @@ -465,22 +467,22 @@ if ($action == 'create') // Ref document print ''; print ''; if ($action != 'editdocref') - print ''; + print ''; print '
'; - print $langs->trans('Docref'); + print $langs->trans('Piece'); print 'piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'
'; print ''; if ($action == 'editdocref') { - print '
'; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'; } else { - print $book->doc_ref ; + print $object->doc_ref ; } print ''; print ''; @@ -495,11 +497,11 @@ if ($action == 'create') print ''; // Doc type - if(! empty($book->doc_type)) + if(! empty($object->doc_type)) { print ''; print ''; - print ''; + print ''; print ''; } @@ -507,7 +509,7 @@ if ($action == 'create') print ''; print ''; print ''; print ''; @@ -516,7 +518,7 @@ if ($action == 'create') print ''; print ''; print ''; print ''; - if ($book->doc_type == 'customer_invoice') + if ($object->doc_type == 'customer_invoice') { $sqlmid = 'SELECT rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."facture as fac"; - $sqlmid .= " WHERE fac.rowid=" . $book->fk_doc; + $sqlmid .= " WHERE fac.rowid=" . $object->fk_doc; dol_syslog("accountancy/bookkeeping/card.php::sqlmid=" . $sqlmid, LOG_DEBUG); $resultmid = $db->query($sqlmid); if ($resultmid) { @@ -560,24 +562,24 @@ if ($action == 'create') print '
'; - $result = $book->fetchAllPerMvt($piece_num, $mode); + $result = $object->fetchAllPerMvt($piece_num, $mode); if ($result < 0) { - setEventMessages($book->error, $book->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { print load_fiche_titre($langs->trans("ListeMvts"), '', ''); - print ''; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; + print ''; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; print '' . "\n"; print "
' . $langs->trans("Doctype") . '' . $book->doc_type . '' . $object->doc_type . '
' . $langs->trans("DateCreation") . ''; - print $book->date_creation ? dol_print_date($book->date_creation, 'day') : ' '; + print $object->date_creation ? dol_print_date($object->date_creation, 'day') : ' '; print '
' . $langs->trans("Status") . ''; - if (empty($book->validated)) { + if (empty($object->validated)) { print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; @@ -533,11 +535,11 @@ if ($action == 'create') /* print '
' . $langs->trans("Control") . '
"; - if (count($book->linesmvt) > 0) { + if (count($object->linesmvt) > 0) { $total_debit = 0; $total_credit = 0; @@ -594,7 +596,7 @@ if ($action == 'create') print "\n"; - foreach ( $book->linesmvt as $line ) { + foreach ($object->linesmvt as $line) { print ''; $total_debit += $line->debit; $total_credit += $line->credit; @@ -616,7 +618,7 @@ if ($action == 'create') } print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; print ''; } @@ -689,11 +691,11 @@ if ($action == 'create') print '
'; if ($total_debit == $total_credit) { - print ''.$langs->trans("ValidTransaction").''; + print ''.$langs->trans("ValidTransaction").''; } else { - print ''; + print ''; } print '   '; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index ad8be2608c1..b0a91f7ce36 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -32,15 +32,15 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; -// Langs -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("accountancy")); $action = GETPOST('action', 'alpha'); $search_mvt_num = GETPOST('search_mvt_num', 'int'); $search_doc_type = GETPOST("search_doc_type"); $search_doc_ref = GETPOST("search_doc_ref"); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); -$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); +$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); +$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); $search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int')); $search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int')); @@ -75,6 +75,8 @@ if ($search_accountancy_aux_code_end == - 1) { } $search_mvt_label = GETPOST('search_mvt_label', 'alpha'); $search_direction = GETPOST('search_direction', 'alpha'); +$search_debit = GETPOST('search_debit', 'alpha'); +$search_credit = GETPOST('search_credit', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); // Load variable for pagination @@ -98,7 +100,7 @@ $form = new Form($db); if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page','int') == '' && ! GETPOST('noreset','int')) { - if (empty($search_date_start) && empty($search_date_end)) + if (empty($search_date_start) && empty($search_date_end) && ! GETPOSTISSET('restore_lastsearch_values')) { $query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $query.= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1"; @@ -181,12 +183,12 @@ $filter = array (); if (! empty($search_date_start)) { $filter['t.doc_date>='] = $search_date_start; $tmp=dol_getdate($search_date_start); - $param .= '&date_startmonth=' . $tmp['mon'] . '&date_startday=' . $tmp['mday'] . '&date_startyear=' . $tmp['year']; + $param .= '&search_date_startmonth=' . $tmp['mon'] . '&search_date_startday=' . $tmp['mday'] . '&search_date_startyear=' . $tmp['year']; } if (! empty($search_date_end)) { $filter['t.doc_date<='] = $search_date_end; $tmp=dol_getdate($search_date_end); - $param .= '&date_endmonth=' . $tmp['mon'] . '&date_endday=' . $tmp['mday'] . '&date_endyear=' . $tmp['year']; + $param .= '&search_date_endmonth=' . $tmp['mon'] . '&search_date_endday=' . $tmp['mday'] . '&search_date_endyear=' . $tmp['year']; } if (! empty($search_doc_date)) { $filter['t.doc_date'] = $search_doc_date; @@ -195,51 +197,51 @@ if (! empty($search_doc_date)) { } if (! empty($search_doc_type)) { $filter['t.doc_type'] = $search_doc_type; - $param .= '&search_doc_type=' . $search_doc_type; + $param .= '&search_doc_type=' . urlencode($search_doc_type); } if (! empty($search_doc_ref)) { $filter['t.doc_ref'] = $search_doc_ref; - $param .= '&search_doc_ref=' . $search_doc_ref; + $param .= '&search_doc_ref=' . urlencode($search_doc_ref); } if (! empty($search_accountancy_code)) { $filter['t.numero_compte'] = $search_accountancy_code; - $param .= '&search_accountancy_code=' . $search_accountancy_code; + $param .= '&search_accountancy_code=' . urlencode($search_accountancy_code); } if (! empty($search_accountancy_code_start)) { $filter['t.numero_compte>='] = $search_accountancy_code_start; - $param .= '&search_accountancy_code_start=' . $search_accountancy_code_start; + $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); } if (! empty($search_accountancy_code_end)) { $filter['t.numero_compte<='] = $search_accountancy_code_end; - $param .= '&search_accountancy_code_end=' . $search_accountancy_code_end; + $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); } if (! empty($search_accountancy_aux_code)) { $filter['t.subledger_account'] = $search_accountancy_aux_code; - $param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code; + $param .= '&search_accountancy_aux_code=' . urlencode($search_accountancy_aux_code); } if (! empty($search_accountancy_aux_code_start)) { $filter['t.subledger_account>='] = $search_accountancy_aux_code_start; - $param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start; + $param .= '&search_accountancy_aux_code_start=' . urlencode($search_accountancy_aux_code_start); } if (! empty($search_accountancy_aux_code_end)) { $filter['t.subledger_account<='] = $search_accountancy_aux_code_end; - $param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end; + $param .= '&search_accountancy_aux_code_end=' . urlencode($search_accountancy_aux_code_end); } if (! empty($search_mvt_label)) { $filter['t.label_operation'] = $search_mvt_label; - $param .= '&search_mvt_label=' . $search_mvt_label; + $param .= '&search_mvt_label=' . urlencode($search_mvt_label); } if (! empty($search_direction)) { $filter['t.sens'] = $search_direction; - $param .= '&search_direction=' . $search_direction; + $param .= '&search_direction=' . urlencode($search_direction); } if (! empty($search_ledger_code)) { $filter['t.code_journal'] = $search_ledger_code; - $param .= '&search_ledger_code=' . $search_ledger_code; + $param .= '&search_ledger_code=' . urlencode($search_ledger_code); } if (! empty($search_mvt_num)) { $filter['t.piece_num'] = $search_mvt_num; - $param .= '&search_mvt_num=' . $search_mvt_num; + $param .= '&search_mvt_num=' . urlencode($search_mvt_num); } if (! empty($search_date_creation_start)) { $filter['t.date_creation>='] = $search_date_creation_start; @@ -263,13 +265,14 @@ if (! empty($search_date_modification_end)) { } if (! empty($search_debit)) { $filter['t.debit'] = $search_debit; - $param .= '&search_debit=' . $search_debit; + $param .= '&search_debit=' . urlencode($search_debit); } if (! empty($search_credit)) { $filter['t.credit'] = $search_credit; - $param .= '&search_credit=' . $search_credit; + $param .= '&search_credit=' . urlencode($search_credit); } + if ($action == 'delbookkeeping') { $import_key = GETPOST('importkey', 'alpha'); @@ -435,10 +438,12 @@ else $button.= $langs->trans("ExportList"); $button.= ''; -$groupby = ' ' . $langs->trans("GroupByAccountAccounting") . ''; -$addbutton = '' . $langs->trans("NewAccountingMvt") . ''; +$groupby = ' ' . $langs->trans("GroupByAccountAccounting") . ''; +$newcardbutton = '' . $langs->trans("NewAccountingMvt").''; +$newcardbutton.= ''; +$newcardbutton.= ''; -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$addbutton, '', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$newcardbutton, '', $limit); $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields @@ -460,11 +465,11 @@ if (! empty($arrayfields['t.doc_date']['checked'])) print '
'; } @@ -612,7 +617,12 @@ if ($num > 0) // Piece number if (! empty($arrayfields['t.piece_num']['checked'])) { - print ''; + print ''; if (! $i) $totalarray['nbfield']++; } @@ -694,7 +704,7 @@ if ($num > 0) } // Action column - print ''; @@ -732,7 +742,7 @@ print ''; // TODO Replace this with mass delete action print ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index c450fb5bb63..80a4f0db5e8 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -1,8 +1,8 @@ - * Copyright (C) 2013-2016 Olivier Geffroy - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2017 Alexandre Spangaro +/* Copyright (C) 2016 Neil Orley + * Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2013-2018 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,35 +26,39 @@ require '../../main.inc.php'; -// Class require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; -// Langs -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("accountancy")); $page = GETPOST("page"); $sortorder = GETPOST("sortorder"); $sortfield = GETPOST("sortfield"); $action = GETPOST('action', 'alpha'); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); -$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); +$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); +$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); - - $search_accountancy_code = GETPOST("search_accountancy_code"); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); if ($search_accountancy_code_start == - 1) { $search_accountancy_code_start = ''; } -$search_label_account = GETPOST('search_label_account', 'alpha'); -$search_mvt_label = GETPOST('search_mvt_label', 'alpha'); +$search_accountancy_code_end = GETPOST('search_accountancy_code_end', 'alpha'); +if ($search_accountancy_code_end == - 1) { + $search_accountancy_code_end = ''; +} +$search_doc_ref = GETPOST('search_doc_ref', 'alpha'); +$search_label_operation = GETPOST('search_label_operation', 'alpha'); $search_direction = GETPOST('search_direction', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); +$search_debit = GETPOST('search_debit', 'alpha'); +$search_credit = GETPOST('search_credit', 'alpha'); // Load variable for pagination $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); @@ -96,63 +100,86 @@ if (empty($search_date_start) && empty($search_date_end)) { $object = new BookKeeping($db); - -$options = ''; -$filter = array (); - -if (! empty($search_date_start)) { - $filter['t.doc_date>='] = $search_date_start; - $options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int'); -} -if (! empty($search_date_end)) { - $filter['t.doc_date<='] = $search_date_end; - $options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int'); -} -if (! empty($search_doc_date)) { - $filter['t.doc_date'] = $search_doc_date; - $options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int'); -} - -if (! GETPOST('button_removefilter_x','alpha') && ! GETPOST('button_removefilter.x','alpha') && ! GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers -{ - if (! empty($search_accountancy_code_start)) { - $filter['t.numero_compte'] = $search_accountancy_code_start; - $options .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); - } - if (! empty($search_label_account)) { - $filter['t.label_operation'] = $search_label_account; - $options .= '&search_label_account=' . urlencode($search_label_account); - } - if (! empty($search_mvt_label)) { - $filter['t.label_operation'] = $search_mvt_label; - $options .= '&search_mvt_label=' . urlencode($search_mvt_label); - } - if (! empty($search_direction)) { - $filter['t.sens'] = $search_direction; - $options .= '&search_direction=' . urlencode($search_direction); - } - if (! empty($search_ledger_code)) { - $filter['t.code_journal'] = $search_ledger_code; - $options .= '&search_ledger_code=' . urlencode($search_ledger_code); - } -} - - /* * Action */ - if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers { $search_doc_date = ''; $search_accountancy_code = ''; $search_accountancy_code_start = ''; - $search_label_account = ''; - $search_mvt_label = ''; + $search_accountancy_code_end = ''; + $search_label_account = ''; + $search_doc_ref = ''; + $search_label_operation = ''; $search_direction = ''; $search_ledger_code = ''; + $search_date_start=''; + $search_date_end=''; + $search_date_startyear=''; + $search_date_startmonth=''; + $search_date_startday=''; + $search_date_endyear=''; + $search_date_endmonth=''; + $search_date_endday=''; + $search_debit = ''; + $search_credit = ''; } +// Must be after the remove filter action, before the export. +$param = ''; +$filter = array (); + +if (! empty($search_date_start)) { + $filter['t.doc_date>='] = $search_date_start; + $param .= '&search_date_startmonth=' . GETPOST('search_date_startmonth', 'int') . '&search_date_startday=' . GETPOST('search_date_startday', 'int') . '&search_date_startyear=' . GETPOST('search_date_startyear', 'int'); +} +if (! empty($search_date_end)) { + $filter['t.doc_date<='] = $search_date_end; + $param .= '&search_date_endmonth=' . GETPOST('search_date_endmonth', 'int') . '&search_date_endday=' . GETPOST('search_date_endday', 'int') . '&search_date_endyear=' . GETPOST('search_date_endyear', 'int'); +} +if (! empty($search_doc_date)) { + $filter['t.doc_date'] = $search_doc_date; + $param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int'); +} +if (! empty($search_accountancy_code_start)) { + $filter['t.numero_compte>='] = $search_accountancy_code_start; + $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); +} +if (! empty($search_accountancy_code_end)) { + $filter['t.numero_compte<='] = $search_accountancy_code_end; + $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); +} +if (! empty($search_label_account)) { + $filter['t.label_compte'] = $search_label_account; + $param .= '&search_label_compte=' . urlencode($search_label_account); +} +if (! empty($search_doc_ref)) { + $filter['t.doc_ref'] = $search_doc_ref; + $param .= '&search_doc_ref=' . urlencode($search_doc_ref); +} +if (! empty($search_label_operation)) { + $filter['t.label_operation'] = $search_label_operation; + $param .= '&search_label_operation=' . urlencode($search_label_operation); +} +if (! empty($search_direction)) { + $filter['t.sens'] = $search_direction; + $param .= '&search_direction=' . urlencode($search_direction); +} +if (! empty($search_ledger_code)) { + $filter['t.code_journal'] = $search_ledger_code; + $param .= '&search_ledger_code=' . urlencode($search_ledger_code); +} +if (! empty($search_debit)) { + $filter['t.debit'] = $search_debit; + $param .= '&search_debit=' . urlencode($search_debit); +} +if (! empty($search_credit)) { + $filter['t.credit'] = $search_credit; + $param .= '&search_credit=' . urlencode($search_credit); +} + + if ($action == 'delmouvconfirm') { $mvt_num = GETPOST('mvt_num', 'int'); @@ -176,7 +203,7 @@ $formaccounting = new FormAccounting($db); $formother = new FormOther($db); $form = new Form($db); -$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting"); +$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . strtolower($langs->trans("AccountAccounting")); llxHeader('', $title_page); @@ -226,41 +253,50 @@ if ($action == 'delbookkeepingyear') { } -$param=$options; - print ''; -$viewflat = ' ' . $langs->trans("ViewFlatList") . ''; -$addbutton = '' . $langs->trans("NewAccountingMvt") . ''; +$viewflat = ' ' . $langs->trans("ViewFlatList") . ''; +$newcardbutton = '' . $langs->trans("NewAccountingMvt").''; +$newcardbutton.= ''; +$newcardbutton.= ''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$addbutton, '', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit); // Reverse sort order if ( preg_match('/^asc/i', $sortorder) ) - $sortorder = "asc"; + $sortorder = "asc"; else - $sortorder = "desc"; + $sortorder = "desc"; print '
'; @@ -653,7 +655,7 @@ if ($action == 'create') if ($total_debit != $total_credit) { - setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings'); + setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_debit, $total_credit)), 'warnings'); } if ($action == "" || $action == 'add') { @@ -673,10 +675,10 @@ if ($action == 'create') print ''; } print '
'; print '
'; print $langs->trans('From') . ' '; - print $form->select_date($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1); + print $form->select_date($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1); print '
'; print '
'; print $langs->trans('to') . ' '; - print $form->select_date($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1); + print $form->select_date($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1); print '
'; print '
' . $line->piece_num . ''; + $object->id = $line->id; + $object->piece_num = $line->piece_num; + print $object->getNomUrl(1,'',0,'',1); + //print '' . $line->piece_num . ''; + print ''; + print ''; print '' . img_edit() . ' '; print '' . img_delete() . ''; print '
'; print ''; -print ''; +print ''; print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print ''; print ''; print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']); -print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder); -print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder); +print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, 'align="right"', $sortfield, $sortorder); +print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("Piece", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Label"); -print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder); -print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder); -print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder); +print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder); +print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder); +print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder); print "\n"; print ''; @@ -295,34 +331,34 @@ while ($i < min($num, $limit)) $total_debit += $line->debit; $total_credit += $line->credit; - $accountg = length_accountg($line->numero_compte); + $accountg = length_accountg($line->numero_compte); //if (empty($accountg)) $accountg = '-'; // Is it a break ? - if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) { + if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) { - // Affiche un Sous-Total par compte comptable - if (isset($displayed_account_number)) { - print ''; - print "\n"; - print "\n"; - print ''; - } + // Affiche un Sous-Total par compte comptable + if (isset($displayed_account_number)) { + print ''; + print "\n"; + print "\n"; + print ''; + } - // Show the break account - $colspan = 9; - print ""; - print ''; - print ''; + // Show the break account + $colspan = 9; + print ""; + print ''; + print ''; - $displayed_account_number = $accountg; - //if (empty($displayed_account_number)) $displayed_account_number='-'; - $sous_total_debit = 0; - $sous_total_credit = 0; - } + $displayed_account_number = $accountg; + //if (empty($displayed_account_number)) $displayed_account_number='-'; + $sous_total_debit = 0; + $sous_total_credit = 0; + } print ''; print ''; @@ -331,22 +367,27 @@ while ($i < min($num, $limit)) // TODO Add a link according to doc_type and fk_doc print ''; + print ''; - // Affiche un lien vers la facture client/fournisseur - $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); - print strlen(length_accounta($line->subledger_account)) == 0 ? '' : ''; + // Affiche un lien vers la facture client/fournisseur + $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); + print strlen(length_accounta($line->subledger_account)) == 0 ? '' : ''; print ''; print ''; - print ''; + + $accountingjournal = new AccountingJournal($db); + $result = $accountingjournal->fetch('',$line->code_journal); + $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal); + print ''; + print ''; print "\n"; diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php b/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php index 550ea1d933a..9bf287bf3c9 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php @@ -33,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php'; require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; +// Load translation files required by the page +$langs->loadLangs(array("compta")); + $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); @@ -141,7 +144,6 @@ if ($object->check_codeclient() != 0) print ''; print ''; -$langs->load('compta'); print ''; print ''; print ''; -$langs->load('compta'); print ''; print ''; } -else { +else +{ print ''; + dol_print_error($db); + } + } + + if($isSupplier) { + if($isCustomer) { + print ''; // class="fichehalfleft" + print '
'; + print '
'; + print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } - print "
' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . ''; +print '
'; +print $langs->trans('From').' '; +print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200'); +print '
'; +print '
'; +print $langs->trans('to').' '; +print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200'); +print '
'; +print '
'; print $langs->trans('From') . ': '; -print $form->select_date($search_date_start, 'date_start', 0, 0, 1); +print $form->select_date($search_date_start, 'search_date_start', 0, 0, 1); print '
'; print $langs->trans('to') . ': '; -print $form->select_date($search_date_end, 'date_end', 0, 0, 1); +print $form->select_date($search_date_end, 'search_date_end', 0, 0, 1); print '
  '; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; @@ -268,14 +304,14 @@ print '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'  
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'  
'; - if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte); - else print ''.$langs->trans("Unknown").''; - print '
'; + if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte); + else print ''.$langs->trans("Unknown").''; + print '
 '; - //if ($line->doc_type == 'supplier_invoice') - //if ($line->doc_type == 'customer_invoice') + //if ($line->doc_type == 'supplier_invoice') + //if ($line->doc_type == 'customer_invoice') print $line->doc_ref; - print '' . $line->label_operation . '' . $line->label_operation . '
(' . length_accounta($line->subledger_account) . ')
' . $line->label_operation . '' . $line->label_operation . '
(' . length_accounta($line->subledger_account) . ')
' . ($line->debit ? price($line->debit) :''). '' . ($line->credit ? price($line->credit) : '') . '' . $line->code_journal . '' . $journaltoshow . ''; print '' . img_edit() . ' '; - print '' . img_delete() . ''; + print '' . img_delete() . ''; print '
'; print $form->editfieldkey("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer); diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php index 35bdcfa23fe..cf278c26903 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php'; require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; +// Load translation files required by the page +$langs->loadLangs(array("compta")); + $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); @@ -157,7 +160,6 @@ if ($object->check_codefournisseur() != 0) print '
'; print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer); diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 92d0f9e4499..27254ef31d1 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -357,15 +357,16 @@ class AccountancyCategory // extends CommonObject * Function to select all accounting accounts from an accounting category * * @param int $id Id - * * @return int <0 if KO, 0 if not found, >0 if OK */ public function display($id) { + global $conf; $sql = "SELECT t.rowid, t.account_number, t.label"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t"; $sql .= " WHERE t.fk_accounting_category = " . $id; + $sql .= " AND t.entity = " . $conf->entity; - $this->lines_display = array (); + $this->lines_display = array(); dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG); $resql = $this->db->query($sql); @@ -401,13 +402,14 @@ class AccountancyCategory // extends CommonObject $sql .= " WHERE t.numero_compte NOT IN ("; $sql .= " SELECT t.account_number"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t"; - $sql .= " WHERE t.fk_accounting_category = " . $id . ")"; + $sql .= " WHERE t.fk_accounting_category = " . $id . " AND t.entity = " . $conf->entity.")"; $sql .= " AND t.numero_compte IN ("; $sql .= " SELECT DISTINCT aa.account_number"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version"; $sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS; - $sql .= " AND aa.active = 1)"; + $sql .= " AND aa.active = 1"; + $sql .= " AND aa.entity = = " . $conf->entity . ")"; $sql .= " GROUP BY t.numero_compte, t.label_operation, t.doc_ref"; $sql .= " ORDER BY t.numero_compte"; @@ -449,6 +451,7 @@ class AccountancyCategory // extends CommonObject $sql .= " WHERE (aa.fk_accounting_category != ".$id." OR aa.fk_accounting_category IS NULL)"; $sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS; $sql .= " AND aa.active = 1"; + $sql .= " AND aa.entity = " . $conf->entity; $sql .= " GROUP BY aa.account_number, aa.label"; $sql .= " ORDER BY aa.account_number, aa.label"; @@ -493,6 +496,7 @@ class AccountancyCategory // extends CommonObject $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version"; $sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS; $sql .= " AND aa.active = 1"; + $sql .= " AND aa.entity = " . $conf->entity; $this->db->begin(); @@ -580,31 +584,27 @@ class AccountancyCategory // extends CommonObject * * @return array Result in table */ - public function getCatsCpts() { - global $mysoc; + public function getCatsCpts() + { + global $mysoc,$conf; + $sql = ""; - if (empty($mysoc->country_id) && empty($mysoc->country_code)) { + if (empty($mysoc->country_id)) { dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined'); exit(); } - if (! empty($mysoc->country_id)) { - $sql = "SELECT t.rowid, t.account_number, t.label as account_label, cat.code, cat.position, cat.label as name_cat, cat.sens "; - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, " . MAIN_DB_PREFIX . "c_accounting_category as cat"; - $sql .= " WHERE t.fk_accounting_category IN ( SELECT c.rowid "; - $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c"; - $sql .= " WHERE c.active = 1"; - $sql .= " AND c.fk_country = " . $mysoc->country_id . ")"; - $sql .= " AND cat.rowid = t.fk_accounting_category"; - $sql .= " ORDER BY cat.position ASC"; - } else { - $sql = "SELECT c.rowid, c.code, c.label, c.category_type "; - $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co"; - $sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid"; - $sql .= " AND co.code = '" . $mysoc->country_code . "'"; - $sql .= " ORDER BY c.position ASC"; - } + $sql = "SELECT t.rowid, t.account_number, t.label as account_label, cat.code, cat.position, cat.label as name_cat, cat.sens "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, " . MAIN_DB_PREFIX . "c_accounting_category as cat"; + $sql .= " WHERE t.fk_accounting_category IN ( SELECT c.rowid "; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c"; + $sql .= " WHERE c.active = 1"; + $sql .= " AND c.entity = " . $conf->entity; + $sql .= " AND (c.fk_country = ".$mysoc->country_id." OR c.fk_country = 0)"; + $sql .= " AND cat.rowid = t.fk_accounting_category"; + $sql .= " AND t.entity = " . $conf->entity; + $sql .= " ORDER BY cat.position ASC"; $resql = $this->db->query($sql); if ($resql) { @@ -685,35 +685,27 @@ class AccountancyCategory // extends CommonObject } /** - * Return list of personalized groups + * Return list of personalized groups that are active * * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @return array Array of groups */ public function getCats($categorytype=-1) { - global $db, $langs, $user, $mysoc; + global $db, $langs, $user, $mysoc, $conf; - if (empty($mysoc->country_id) && empty($mysoc->country_code)) { + if (empty($mysoc->country_id)) { dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined'); exit(); } - if (! empty($mysoc->country_id)) { - $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type"; - $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c"; - $sql .= " WHERE c.active = 1 "; - if ($categorytype >= 0) $sql.=" AND c.category_type = 1"; - $sql .= " AND c.fk_country = " . $mysoc->country_id; - $sql .= " ORDER BY c.position ASC"; - } else { // Note: this should not happen - $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type"; - $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co"; - $sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid"; - if ($categorytype >= 0) $sql.=" AND c.category_type = 1"; - $sql .= " AND co.code = '" . $mysoc->country_code . "'"; - $sql .= " ORDER BY c.position ASC"; - } + $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type"; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c"; + $sql .= " WHERE c.active = 1 "; + $sql .= " AND c.entity = " . $conf->entity; + if ($categorytype >= 0) $sql.=" AND c.category_type = 1"; + $sql .= " AND (c.fk_country = ".$mysoc->country_id." OR c.fk_country = 0)"; + $sql .= " ORDER BY c.position ASC"; $resql = $this->db->query($sql); if ($resql) { @@ -770,14 +762,14 @@ class AccountancyCategory // extends CommonObject $sql = "SELECT t.rowid, t.account_number, t.label as account_label"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t"; $sql .= " WHERE t.fk_accounting_category = ".$cat_id; - $sql .= " ORDER BY t.account_number "; + $sql .= " ORDER BY t.account_number"; } else { $sql = "SELECT t.rowid, t.account_number, t.label as account_label"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t"; $sql .= " WHERE ".$predefinedgroupwhere; - $sql .= " ORDER BY t.account_number "; + $sql .= " ORDER BY t.account_number"; } //echo $sql; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 3a12d606fdd..52b5f1c411f 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -1,14 +1,14 @@ - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Florian Henry - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2016 Pierre-Henry Favre - * Copyright (C) 2016-2017 Alexandre Spangaro - * Copyright (C) 2013-2017 Olivier Geffroy - * Copyright (C) 2017 Elarifr. Ari Elbaz - * Copyright (C) 2017 Frédéric France + * Copyright (C) 2007-2012 Laurent Destailleur + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Florian Henry + * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2016 Pierre-Henry Favre + * Copyright (C) 2016-2018 Alexandre Spangaro + * Copyright (C) 2013-2017 Olivier Geffroy + * Copyright (C) 2017 Elarifr. Ari Elbaz + * Copyright (C) 2017 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -177,7 +177,7 @@ class AccountancyExport */ public static function downloadFile() { global $conf; - $journal = 'bookkepping'; + $filename = 'general_ledger'; include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; } diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 6b7e925832b..257c2af0111 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -84,7 +84,8 @@ class AccountingAccount extends CommonObject * @param int $limittocurrentchart 1=Do not load record if it is into another accounting system * @return int <0 if KO, 0 if not found, Id of record if OK and found */ - function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) { + function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) + { global $conf; if ($rowid || $account_number) { @@ -96,10 +97,10 @@ class AccountingAccount extends CommonObject if ($rowid) { $sql .= " a.rowid = '" . $rowid . "'"; } elseif ($account_number) { - $sql .= " a.account_number = '" . $account_number . "'"; + $sql .= " a.account_number = '" . $this->db->escape($account_number) . "'"; } if (! empty($limittocurrentchart)) { - $sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; + $sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')'; } dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG); @@ -201,9 +202,9 @@ class AccountingAccount extends CommonObject $sql .= ", " . (empty($this->pcg_type) ? 'NULL' : "'" . $this->db->escape($this->pcg_type) . "'"); $sql .= ", " . (empty($this->pcg_subtype) ? 'NULL' : "'" . $this->db->escape($this->pcg_subtype) . "'"); $sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->db->escape($this->account_number) . "'"); - $sql .= ", " . (empty($this->account_parent) ? 'NULL' : "'" . $this->db->escape($this->account_parent) . "'"); + $sql .= ", " . (empty($this->account_parent) ? '0' : "'" . $this->db->escape($this->account_parent) . "'"); $sql .= ", " . (empty($this->label) ? 'NULL' : "'" . $this->db->escape($this->label) . "'"); - $sql .= ", " . (empty($this->account_category) ? 'NULL' : "'" . $this->db->escape($this->account_category) . "'"); + $sql .= ", " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category)); $sql .= ", " . $user->id; $sql .= ", " . (! isset($this->active) ? 'NULL' : $this->db->escape($this->active)); $sql .= ")"; @@ -274,7 +275,7 @@ class AccountingAccount extends CommonObject $sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'"; $sql .= " , account_parent = '" . $this->db->escape($this->account_parent) . "'"; $sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "null"); - $sql .= " , fk_accounting_category = '" . $this->db->escape($this->account_category) . "'"; + $sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category)); $sql .= " , fk_user_modif = " . $user->id; $sql .= " , active = " . $this->active; $sql .= " WHERE rowid = " . $this->id; @@ -384,14 +385,15 @@ class AccountingAccount extends CommonObject /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param int $withlabel 0=No label, 1=Include label of account - * @param int $nourl 1=Disable url - * @param string $moretitle Add more text to title tooltip - * @param int $notooltip 1=Disable tooltip + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $withlabel 0=No label, 1=Include label of account + * @param int $nourl 1=Disable url + * @param string $moretitle Add more text to title tooltip + * @param int $notooltip 1=Disable tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1) { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -402,6 +404,11 @@ class AccountingAccount extends CommonObject $url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id; + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + $picto = 'billr'; $label=''; @@ -560,7 +567,7 @@ class AccountingAccount extends CommonObject function LibStatut($statut,$mode=0) { global $langs; - $langs->load('users'); + $langs->loadLangs(array("users")); if ($mode == 0) { diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 3e2c0840f8a..454de6d7b84 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -36,7 +36,7 @@ class AccountingJournal extends CommonObject public $code; public $label; - public $nature; // 0:various operations, 1:sale, 2:purchase, 3:bank, 4:expense-report, 9: has-new + public $nature; // 1:various operations, 2:sale, 3:purchase, 4:bank, 5:expense-report, 8:inventory, 9: has-new public $active; public $lines; @@ -256,7 +256,7 @@ class AccountingJournal extends CommonObject { global $langs; - $langs->load("accountancy"); + $langs->loadLangs(array("accountancy")); if ($mode == 0) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 16f40139a38..f7fed2e2b5b 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -170,7 +170,7 @@ class BookKeeping extends CommonObject // Check parameters if (empty($this->numero_compte) || $this->numero_compte == '-1' || $this->numero_compte == 'NotDefined') { - $langs->load("errors"); + $langs->loadLangs(array("errors")); if (in_array($this->doc_type, array('bank', 'expense_report'))) { $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type); @@ -246,9 +246,6 @@ class BookKeeping extends CommonObject } $now = dol_now(); - if (empty($this->date_create)) { - $this->date_create = $now; - } $sql = "INSERT INTO " . MAIN_DB_PREFIX . $this->table_element . " ("; $sql .= "doc_date"; @@ -291,7 +288,7 @@ class BookKeeping extends CommonObject $sql .= "," . $this->montant; $sql .= ",'" . $this->db->escape($this->sens) . "'"; $sql .= ",'" . $this->db->escape($this->fk_user_author) . "'"; - $sql .= ",'" . $this->db->idate($this->date_create). "'"; + $sql .= ",'" . $this->db->idate($now). "'"; $sql .= ",'" . $this->db->escape($this->code_journal) . "'"; $sql .= ",'" . $this->db->escape($this->journal_label) . "'"; $sql .= "," . $this->db->escape($this->piece_num); @@ -354,6 +351,67 @@ class BookKeeping extends CommonObject } } + /** + * Return a link to the object card (with optionaly the picto) + * + * @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 ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + { + global $db, $conf, $langs; + global $dolibarr_main_authentication, $dolibarr_main_demo; + global $menumanager; + + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips + + $result = ''; + $companylink = ''; + + $label = '' . $langs->trans("Transaction") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->piece_num; + + $url = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$this->piece_num; + + if ($option != 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } + + $linkclose=''; + if (empty($notooltip)) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowTransaction"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; + } + else $linkclose = ($morecss?' class="'.$morecss.'"':''); + + $linkstart = ''; + $linkend=''; + + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->piece_num; + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + return $result; + } + /** * Create object into database * @@ -435,9 +493,6 @@ class BookKeeping extends CommonObject $this->credit = price2num($this->credit, 'MT'); $now = dol_now(); - if (empty($this->date_create)) { - $this->date_create = $now; - } // Check parameters // Put here code to add control on parameters values @@ -484,7 +539,7 @@ class BookKeeping extends CommonObject $sql .= ' ' . (! isset($this->montant) ? 'NULL' : $this->montant ). ','; $sql .= ' ' . (! isset($this->sens) ? 'NULL' : "'" . $this->db->escape($this->sens) . "'") . ','; $sql .= ' ' . $user->id . ','; - $sql .= ' ' . "'" . $this->db->idate($this->date_create) . "',"; + $sql .= ' ' . "'" . $this->db->idate($now) . "',"; $sql .= ' ' . (empty($this->code_journal) ? 'NULL' : "'" . $this->db->escape($this->code_journal) . "'") . ','; $sql .= ' ' . (empty($this->journal_label) ? 'NULL' : "'" . $this->db->escape($this->journal_label) . "'") . ','; $sql .= ' ' . (empty($this->piece_num) ? 'NULL' : $this->db->escape($this->piece_num)).','; @@ -501,7 +556,7 @@ class BookKeeping extends CommonObject } if (! $error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element); + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode); if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you @@ -676,12 +731,12 @@ class BookKeeping extends CommonObject $sqlwhere[] = $key . '=' . $value; } elseif ($key == 't.subledger_account' || $key == 't.numero_compte') { $sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\''; - } elseif ($key == 't.label_operation') { - $sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\''; } elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') { $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; + } elseif ($key == 't.credit' || $key == 't.debit') { + $sqlwhere[] = natural_search($key, $value, 1, 1); } else { - $sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\''; + $sqlwhere[] = natural_search($key, $value, 0, 1); } } } @@ -804,13 +859,14 @@ class BookKeeping extends CommonObject $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; } elseif ($key == 't.tms>=' || $key == 't.tms<=') { $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; + } elseif ($key == 't.credit' || $key == 't.debit') { + $sqlwhere[] = natural_search($key, $value, 1, 1); } else { - $sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\''; + $sqlwhere[] = natural_search($key, $value, 0, 1); } } } - $sql.= ' WHERE 1 = 1'; - $sql .= " AND entity IN (" . getEntity('accountancy') . ")"; + $sql.= ' WHERE entity IN (' . getEntity('accountancy') . ')'; if (count($sqlwhere) > 0) { $sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere); } @@ -1101,7 +1157,7 @@ class BookKeeping extends CommonObject $this->db->begin(); $sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element . $mode . " as ab"; - $sql .= ' SET ab.' . $field . '=' . (is_numeric($value)?$value:"'".$value."'"); + $sql .= ' SET ab.' . $field . '=' . (is_numeric($value)?$value:"'".$this->db->escape($value)."'"); $sql .= ' WHERE ab.piece_num=' . $piece_num ; $resql = $this->db->query($sql); @@ -1184,7 +1240,7 @@ class BookKeeping extends CommonObject // first check if line not yet in bookkeeping $sql = "DELETE"; $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; - $sql .= " WHERE import_key = '" . $importkey . "'"; + $sql .= " WHERE import_key = '" . $this->db->escape($importkey) . "'"; $resql = $this->db->query($sql); @@ -1222,7 +1278,7 @@ class BookKeeping extends CommonObject $sql.= " FROM " . MAIN_DB_PREFIX . $this->table_element.$mode; $sql.= " WHERE 1 = 1"; if (! empty($delyear)) $sql.= " AND YEAR(doc_date) = " . $delyear; // FIXME Must use between - if (! empty($journal)) $sql.= " AND code_journal = '".$journal."'"; + if (! empty($journal)) $sql.= " AND code_journal = '".$this->db->escape($journal)."'"; $sql .= " AND entity IN (" . getEntity('accountancy') . ")"; $resql = $this->db->query($sql); @@ -1254,7 +1310,7 @@ class BookKeeping extends CommonObject // first check if line not yet in bookkeeping $sql = "DELETE"; $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; - $sql .= " WHERE piece_num = " . $piecenum; + $sql .= " WHERE piece_num = " . (int) $piecenum; $sql .= " AND entity IN (" . getEntity('accountancy') . ")"; $resql = $this->db->query($sql); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 92d8f7b1c37..7e1387db951 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -24,13 +24,11 @@ */ require '../../main.inc.php'; -// Class require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; -// Langs -$langs->load("bills"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("bills","accountancy")); $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); @@ -162,4 +160,4 @@ if (! empty($id)) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 15d598bcf40..277e2b59cb6 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -31,12 +31,8 @@ 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'; -// Langs -$langs->load("compta"); -$langs->load("bills"); -$langs->load("other"); -$langs->load("main"); -$langs->load("accountancy"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","other","main","accountancy")); // Security check if (empty($conf->accounting->enabled)) { @@ -47,15 +43,24 @@ if ($user->societe_id > 0) if (! $user->rights->accounting->bind->write) accessforbidden(); -// Filter -$year = GETPOST("year",'int'); -if ($year == 0) { - $year_current = strftime("%Y", time()); - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; + +$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); +if (GETPOST("year",'int')) $year_start = GETPOST("year",'int'); +else +{ + $year_start = dol_print_date(dol_now(), '%Y'); + if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } +$year_end = $year_start + 1; +$month_end = $month_start - 1; +if ($month_end < 1) +{ + $month_end = 12; + $year_end--; +} +$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); +$search_date_end = dol_get_last_day($year_end, $month_end); +$year_current = $year_start; // Validate History $action = GETPOST('action','aZ09'); @@ -108,30 +113,6 @@ if ($action == 'validatehistory') { $db->commit(); setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs'); } -} elseif ($action == 'cleanaccountancycode') { - $error = 0; - $db->begin(); - - // Now clean - $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd"; - $sql1.= " SET fk_code_ventilation = 0"; - $sql1.= " WHERE fd.fk_facture IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture 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)) . "'"; - $sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")"; - $sql1.=")"; - - dol_syslog("htdocs/accountancy/customer/index.php cleanaccountancycode", LOG_DEBUG); - - $resql1 = $db->query($sql1); - if (! $resql1) { - $error ++; - $db->rollback(); - setEventMessage($db->lasterror(), 'errors'); - } else { - $db->commit(); - setEventMessage($langs->trans('Done'), 'mesgs'); - } } @@ -144,6 +125,7 @@ llxHeader('', $langs->trans("CustomersVentilation")); $textprevyear = '' . img_previous() . ''; $textnextyear = ' ' . img_next() . ''; + print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy'); // Clean database @@ -170,54 +152,39 @@ print $langs->trans("DescVentilCustomer") . '
'; print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '
'; print '
'; -$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd"; -$sql .= " , " . MAIN_DB_PREFIX . "facture as f"; -$sql .= " WHERE fd.fk_code_ventilation = 0"; -$sql .= " AND f.rowid = fd.fk_facture"; -$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_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")"; -} -$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy - -dol_syslog('htdocs/accountancy/customer/index.php'); -$result = $db->query($sql); -if ($result) { - $row = $db->fetch_row($result); - $nbfac = $row[0]; - $db->free($result); -} $y = $year_current; $buttonbind = '' . $langs->trans("ValidateHistory") . ''; -$buttonreset = '' . $langs->trans("CleanHistory", $year_current) . ''; - -print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, ''); +print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1); +//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, ''); print '
'; print ''; print ''; print ''; for($i = 1; $i <= 12; $i ++) { - print ''; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; } print ''; $sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,"; $sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,"; for($i = 1; $i <= 12; $i ++) { - $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; } $sql .= " SUM(fd.total_ht) as total"; $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; -$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; -$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; +$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'"; +$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; +$sql .= " AND f.fk_statut > 0"; $sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy $sql .= " AND aa.account_number IS NULL"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -262,32 +229,39 @@ if ($resql) { print "
' . $langs->trans("Account") . '' . $langs->trans("Label") . '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
\n"; print '
'; + print '
'; -print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, ''); +print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1); +//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', ''); print '
'; print ''; print ''; print ''; for($i = 1; $i <= 12; $i ++) { - print ''; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; } print ''; $sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,"; $sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,"; for($i = 1; $i <= 12; $i ++) { - $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; } $sql .= " SUM(fd.total_ht) as total"; $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; -$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; -$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; +$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'"; +$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; $sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy +$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 { @@ -319,7 +293,7 @@ if ($resql) { else print $row[1]; print ''; - for($i = 2; $i <= 12; $i ++) { + for($i = 2; $i <= 12; $i++) { print ''; } print ''; @@ -339,26 +313,32 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. print '
'; print '
'; - print_fiche_titre($langs->trans("OtherInfo"), '', ''); + print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1); + //print_fiche_titre($langs->trans("OtherInfo"), '', ''); print '
'; print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
' . price($row[$i]) . '' . price($row[13]) . '
'; print ''; for($i = 1; $i <= 12; $i ++) { - print ''; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; } print ''; $sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,"; for($i = 1; $i <= 12; $i ++) { - $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; } $sql .= " SUM(fd.total_ht) as total"; $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; - $sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; - $sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; + $sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'"; + $sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; $sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy + $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 { @@ -392,20 +372,25 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. print '
' . $langs->trans("TotalVente") . '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
'; print ''; for($i = 1; $i <= 12; $i ++) { - print ''; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; } print ''; $sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,"; for($i = 1; $i <= 12; $i ++) { - $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; } $sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total"; $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; - $sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; - $sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; + $sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'"; + $sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; $sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy + $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 { diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index c4c3d03ee97..4eccef67246 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -27,7 +27,6 @@ */ require '../../main.inc.php'; -// Class require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; @@ -35,12 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; -// Langs -$langs->load("bills"); -$langs->load("compta"); -$langs->load("main"); -$langs->load("accountancy"); -$langs->load("productbatch"); +// Load translation files required by the page +$langs->loadLangs(array("bills","compta","accountancy","productbatch")); $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); @@ -110,27 +105,37 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', if (is_array($changeaccount) && count($changeaccount) > 0) { $error = 0; - $db->begin(); - - $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l"; - $sql1 .= " SET l.fk_code_ventilation=" . GETPOST('account_parent','int'); - $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')'; - - dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1); - $resql1 = $db->query($sql1); - if (! $resql1) { - $error ++; - setEventMessages($db->lasterror(), null, 'errors'); - } - if (! $error) { - $db->commit(); - setEventMessages($langs->trans('Save'), null, 'mesgs'); - } else { - $db->rollback(); - setEventMessages($db->lasterror(), null, 'errors'); + if (! (GETPOST('account_parent','int') >= 0)) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors'); + } + + if (! $error) + { + $db->begin(); + + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l"; + $sql1 .= " SET l.fk_code_ventilation=" . (GETPOST('account_parent','int') > 0 ? GETPOST('account_parent','int') : '0'); + $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')'; + + dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1); + $resql1 = $db->query($sql1); + if (! $resql1) { + $error ++; + setEventMessages($db->lasterror(), null, 'errors'); + } + if (! $error) { + $db->commit(); + setEventMessages($langs->trans('Save'), null, 'mesgs'); + } else { + $db->rollback(); + setEventMessages($db->lasterror(), null, 'errors'); + } + + $account_parent = ''; // Protection to avoid to mass apply it a second time } - $account_parent = ''; // Protection to avoid to mass apply it a second time } @@ -163,20 +168,24 @@ print ''."\n"; + + print ''; + print ''; + print ''; + + print '
' . $langs->trans("TotalMarge") . '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
'; + print ''."\n"; + + // Name + print ''."\n"; + + // Address + print ''."\n"; + + print ''."\n"; + + print ''."\n"; + + // Country + print ''."\n"; + + print ''."\n"; + + print ''; + print ''."\n"; + + print ''; + print ''."\n"; + + print ''; + print ''."\n"; + + // Web + print ''; + print ''."\n"; + + // Code + print ''."\n"; + + // Note + print ''; + print ''; + + print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; + print '
'; + print '
'; + print '
'; + print '
'; + //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization + print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); + print '
'; + $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); + print '
'; + print '
'; + print '
'; + print '
'; + print '
'; + print '
'; + print '
'; + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + print '
'; + + print ''; +} +else +{ + /* + * Show parameters + */ + + // Actions buttons + //print '
'; + //print ''.$langs->trans("Modify").''; + //print '

'; + + print '
'; + print ''; + print ''; + + + print ''; + + + print ''; + + + print ''; + + + print ''; + + + print ''; + + + if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; + print $conf->global->MAIN_INFO_ACCOUNTANT_NAME; + print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("CompanyCountry").''; + if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) + { + $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); + $img=picto_from_langcode($code); + print $img?$img.' ':''; + print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY,1); + } + print '
'.$langs->trans("Region-State").''; + else print '
'.$langs->trans("State").''; + if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); + else print ' '; + print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE,$mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX,$mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL,0,0,0,80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB,'_blank',80) . '
'.$langs->trans("AccountantFileNumber").'' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '
'; + print "
"; + + print ''; + + // Actions buttons + print '
'; + print ''; + print '
'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 2c90c0ed99b..6fedfa6d2cb 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $action = GETPOST('action','alpha'); $cancel = GETPOST('cancel','alpha'); @@ -75,6 +74,12 @@ else if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers { $search_event = ''; + $action = ''; +} + +if (GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') ||GETPOST('button_search','alpha')) // To avoid the save when we click on search +{ + $action = ''; } if ($action == "save" && empty($cancel)) @@ -106,34 +111,6 @@ if ($action == "save" && empty($cancel)) } } -if (preg_match('/set_(.*)/',$action,$reg)) -{ - $code=$reg[1]; - $value=(GETPOST($code) ? GETPOST($code) : 1); - if (dolibarr_set_const($db, $code, $value, '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, $conf->entity) > 0) - { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} /** diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 4c61500494d..fadb144b883 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 4c1b49d75e6..906ecd8d092 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; if (!$user->admin) accessforbidden(); -$langs->load("agenda"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('agenda', 'admin', 'other')); $def = array(); $actiontest=GETPOST('test','alpha'); @@ -148,7 +147,6 @@ print "
\n"; $selectedvalue=$conf->global->AGENDA_DISABLE_EXT; if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; -$var=true; print ""; print ""; @@ -202,7 +200,6 @@ print ''; print ""; $i=1; -$var=true; while ($i <= $MAXAGENDA) { $key=$i; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 54414e094d3..2d20d285720 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $action = GETPOST('action','alpha'); $value = GETPOST('value','alpha'); @@ -52,10 +51,10 @@ $type = 'action'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; - $value=(GETPOST($code) ? GETPOST($code) : 1); + $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); @@ -67,7 +66,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -if (preg_match('/del_(.*)/',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 3e946dd8e60..e78a8e089ed 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array("admin","other","agenda")); $action = GETPOST('action','alpha'); $value = GETPOST('value','alpha'); @@ -47,10 +46,10 @@ $type = 'action'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; - $value=(GETPOST($code) ? GETPOST($code) : 1); + $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); @@ -62,7 +61,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -if (preg_match('/del_(.*)/',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -173,8 +172,6 @@ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); -print "
\n"; - diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index ac19eb24c03..481a850790e 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array("admin","other","agenda")); $def = array(); $actionsave=GETPOST('save','alpha'); diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 236a494c060..a4e9e4bb210 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -1,9 +1,9 @@ +/* Copyright (C) 2009 Laurent Destailleur * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2013-2014 Philippe Grand - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2013-2018 Philippe Grand + * 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 @@ -31,11 +31,8 @@ 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 . '/societe/class/companybankaccount.class.php'; -$langs->load("admin"); -$langs->load("companies"); -$langs->load("bills"); -$langs->load("other"); -$langs->load("banks"); +// Load translation files required by the page +$langs->loadLangs(array("admin","companies","bills","other","banks")); if (!$user->admin) accessforbidden(); @@ -178,10 +175,6 @@ print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, $head = bank_admin_prepare_head(null); dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account'); -$var = true; - -$var = !$var; - //Show bank account order print load_fiche_titre($langs->trans("BankOrderShow"), '', ''); @@ -201,12 +194,10 @@ $bankorder[1][0] = $langs->trans("BankOrderES"); $bankorder[1][1] = $langs->trans("BankOrderESDesc"); $bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber'; -$var = true; $i = 0; $nbofbank = count($bankorder); while ($i < $nbofbank) { - $var = !$var; print ''; print '
'.$langs->trans("Color").'
' . $bankorder[$i][0] . "\n"; @@ -238,7 +229,6 @@ while ($i < $nbofbank) { print '
' . "\n"; - print '

'; @@ -430,7 +420,8 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) { print ''; print '
' . "\n"; print '' . img_picto($langs->trans("Disabled"), 'switch_off') . ''; diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index aba65f63887..19446092923 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -30,8 +30,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("banks"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'admin')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 313a852e384..7c6792e1a02 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -28,6 +28,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) accessforbidden(); @@ -157,7 +158,6 @@ foreach($dirbarcode as $reldir) /* * CHOIX ENCODAGE */ -$var=true; print '
'; print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'',''); @@ -185,7 +185,6 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - $var=true; while ($i < $num) { @@ -277,7 +276,6 @@ print "
"; print ''; print ""; -$var=true; print ''; print ''; print ''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index bc1dc74f6c4..04fd76e96fc 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -28,8 +28,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load("admin"); -$langs->load("boxes"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'boxes')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 86b38283649..df628ecc87f 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2013-2014 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify @@ -31,11 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; -$langs->load("admin"); -$langs->load("companies"); -$langs->load("bills"); -$langs->load("other"); -$langs->load("banks"); +// Load translation files required by the page +$langs->loadLangs(array("admin","companies","bills","other","banks")); if (!$user->admin) accessforbidden(); @@ -133,8 +130,6 @@ foreach ($dirmodels as $reldir) $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')) @@ -166,7 +161,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var = !$var; print ''; print ''; print ''; print "\n"; -$var=true; - -$var=! $var; $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index e9224ba4688..c2cfaf9f72a 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -26,6 +26,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) accessforbidden(); @@ -72,8 +73,6 @@ print ''; print ''; print ''; -$var=true; - print '
'.$langs->trans("Parameter").'
'; print (empty($module->name)?$name:$module->name); print "\n"; @@ -254,9 +248,6 @@ print ''.$langs->trans("Parameters").'  
'; print ''; print ''; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 5db56c82aa2..cee12e4b08e 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -36,10 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("orders"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'orders', 'other')); if (! $user->admin) accessforbidden(); @@ -286,7 +284,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { @@ -406,7 +403,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -537,7 +533,6 @@ print ''; print ''; print "\n"; print "\n"; -$var=true; $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); @@ -545,7 +540,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; print ''; print ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 1a0680363a9..949038b4413 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011-2017 Philippe Grand * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2017 Rui Strecht * * 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 @@ -37,17 +38,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $action=GETPOST('action','aZ09'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'admincompany'; // To manage different context of search -$langs->load("admin"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'companies')); if (! $user->admin) accessforbidden(); $error=0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$contextpage=array('admincompany','globaladmin'); -$hookmanager->initHooks($contextpage); +$hookmanager->initHooks(array('admincompany','globaladmin')); /* * Actions @@ -74,11 +75,12 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM", GETPOST("nom",'nohtml'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("address",'nohtml'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("town",'nohtml'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("zipcode",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("MAIN_INFO_SOCIETE_ADDRESS",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("MAIN_INFO_SOCIETE_TOWN",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("MAIN_INFO_SOCIETE_ZIP",'alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE", GETPOST("state_id",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_REGION", GETPOST("region_code",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency",'aZ09'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL", GETPOST("tel",'alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX", GETPOST("fax",'alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL", GETPOST("mail",'alpha'),'chaine',0,'',$conf->entity); @@ -154,26 +156,27 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } } - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_GDPR", GETPOST("MAIN_INFO_GDPR",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5",'nohtml'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6",'nohtml'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva",'nohtml'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("object",'nohtml'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("SOCIETE_FISCAL_MONTH_START",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("SOCIETE_FISCAL_MONTH_START",'int'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "FACTURE_TVAOPTION", GETPOST("optiontva",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "FACTURE_TVAOPTION", GETPOST("optiontva",'aZ09'),'chaine',0,'',$conf->entity); // Local taxes - dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION", GETPOST("optionlocaltax1",'alpha'),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION", GETPOST("optionlocaltax2",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION", GETPOST("optionlocaltax1",'aZ09'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION", GETPOST("optionlocaltax2",'aZ09'),'chaine',0,'',$conf->entity); if($_POST["optionlocaltax1"]=="localtax1on") { @@ -183,9 +186,9 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } else { - dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','aZ09'),'chaine',0,'',$conf->entity); } - dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'aZ09'),'chaine',0,'',$conf->entity); } if($_POST["optionlocaltax2"]=="localtax2on") { @@ -195,9 +198,9 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } else { - dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','aZ09'),'chaine',0,'',$conf->entity); } - dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'alpha'),'chaine',0,'',$conf->entity); + dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'aZ09'),'chaine',0,'',$conf->entity); } if ($action != 'updateedit' && ! $error) @@ -293,7 +296,11 @@ $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst") print load_fiche_titre($langs->trans("CompanyFoundation"),'','title_setup'); -print $langs->trans("CompanyFundationDesc")."
\n"; +$head = company_admin_prepare_head(); + +dol_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company'); + +print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save"))."
\n"; print "
\n"; if ($action == 'edit' || $action == 'updateedit') @@ -324,33 +331,33 @@ if ($action == 'edit' || $action == 'updateedit') // Addresse - print '
'."\n"; + print ''."\n"; - print ''."\n"; + print ''."\n"; - print ''."\n"; + print ''."\n"; // Country print ''."\n"; print ''."\n"; print ''."\n"; @@ -409,7 +416,7 @@ if ($action == 'edit' || $action == 'updateedit') // IDs of the company (country-specific) print '
'.$langs->trans("Name").'
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; - print '
'; + print '
'; - print '
'; + print '
'; - print '
'; + print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization - print $form->select_country($mysoc->country_id,'country_id'); + print $form->select_country($mysoc->country_id, 'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'; - $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id'); + $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE, $mysoc->country_code, 'state_id'); print '
'; - print $form->selectCurrency($conf->currency,"currency"); + print $form->selectCurrency($conf->currency, "currency"); print '
'; - print ''; + print ''; $langs->load("companies"); @@ -418,6 +425,13 @@ if ($action == 'edit' || $action == 'updateedit') print ''; + // GDPR contact + + print ''; + // Capital print '\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -507,7 +501,6 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var = !$var; print ''; - } - $db->free($resql); - print "
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; print '
'; + print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); + print ''; + print '
'; @@ -562,7 +576,7 @@ if ($action == 'edit' || $action == 'updateedit') print '
'; print ''; print ''; - print ''; + print ''; print ''; print "\n"; @@ -595,7 +609,7 @@ if ($action == 'edit' || $action == 'updateedit') print '
'; print '
'.$langs->trans("VATManagement").''.$langs->trans("Description").''.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; print ''; - print ''; + print ''; print ''; print "\n"; @@ -726,8 +740,9 @@ else print ''; - print ''; @@ -808,6 +823,11 @@ else print ''; + // GDPR Contact + + print ''; + // Capital print '\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -377,7 +374,6 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var = !$var; print ''; print ''; print ''; print "\n"; -$var=true; $substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); @@ -480,7 +475,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; echo ''; echo ''; -$var=true; foreach ($rules as $rule) { - echo ''; - + echo ''; + echo ''; - - + + echo ''; - - - + + echo ''; - - + + echo ''; - - + + echo ''; - - + + echo ''; - - + + echo ''; - - + + echo ''; - + echo ''; - $var=!$var; } @@ -355,12 +348,12 @@ echo ''; dol_fiche_end(); llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index 51de27998da..b6f12a723ff 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -31,9 +31,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; - -$langs->load("admin"); -$langs->load("exports"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'exports')); $langs->load('other'); @@ -100,4 +99,4 @@ print '
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").''.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").' 
'.$langs->trans("State").''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE); + if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '
'.$langs->trans("Region-State").''; + else print '
'.$langs->trans("State").''; + if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); else print ' '; print '
'.$langs->trans("ManagingDirectors").''; print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '
'.$langs->trans("GDPRContact").''; + print $conf->global->MAIN_INFO_GDPR . '
'.$langs->trans("Capital").''; @@ -1131,8 +1151,6 @@ else print '
'; print ''; print '
'; - - print '
'; } diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 3f765d3e18c..8e17541bfef 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -29,9 +29,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load('admin'); -$langs->load('compta'); -$langs->load('accountancy'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'compta', 'accountancy')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index cd771cdb0f7..e4691a42e78 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -29,9 +29,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; -$langs->load("admin"); -$langs->load("sendings"); -$langs->load("deliveries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'sendings', 'deliveries')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 7d7b8a8510c..afb2d31efce 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 83c3634c35c..74f7acb04f3 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2018 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 @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array("admin","errors","contracts")); if (!$user->admin) accessforbidden(); @@ -220,7 +219,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { @@ -339,7 +337,6 @@ print "
'; print (empty($module->name)?$name:$module->name); print "\n"; @@ -472,7 +468,6 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp'); print '
'; diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php new file mode 100644 index 00000000000..4f3d45294a9 --- /dev/null +++ b/htdocs/admin/dav.php @@ -0,0 +1,143 @@ + + * + * 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/dav.php + * \ingroup dav + * \brief Page to setup DAV server + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin","other","agenda")); + +if (!$user->admin) + accessforbidden(); + +// Parameters +$action = GETPOST('action', 'alpha'); +$backtopage = GETPOST('backtopage', 'alpha'); + +$arrayofparameters=array('DAV_ALLOW_PUBLIC_DIR'=>array('css'=>'minwidth200')); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; + + + +/* + * View + */ + + +llxHeader('', $langs->trans("DAVSetup"), $wikihelp); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("DAVSetup"),$linkback,'title_setup'); + + +print ''; +print ''; + +$head=dav_admin_prepare_head(); + +dol_fiche_head($head, 'webdav', '', -1, 'action'); + + +if ($action == 'edit') +{ + print ''; + print ''; + print ''; + + print ''; + print ''; + + foreach($arrayofparameters as $key => $val) + { + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); + print '
'; + + print '
'; + print ''; + print '
'; + + print ''; + print '
'; +} +else +{ + print ''; + print ''; + + foreach($arrayofparameters as $key => $val) + { + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $form->textwithpicto($langs->trans($key),$langs->trans($key.'Tooltip')); + print '' . $conf->global->$key . '
'; + + print '
'; + print ''.$langs->trans("Modify").''; + print '
'; +} + + +dol_fiche_end(); + +/*print '
'; +print "trans("Save")."\">"; +print "
"; +*/ +print "\n"; + + +clearstatcache(); + +print $langs->trans("WebDAVSetupDesc")."
\n"; +print "
"; + + +// 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 + + +// Show message +$message=''; +$url=''.$urlwithroot.'/dav/fileserver.php'; +$message.=img_picto('','object_globe.png').' '.$langs->trans("WebDavServer",'WebDAV',$url); +$message.='
'; +print $message; + + +llxFooter(); +$db->close(); diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 790445f7032..0633ee90965 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Regis Houssin +/* Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2017-2018 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 @@ -26,12 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("sms"); -$langs->load("other"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin', 'sms', 'other', 'errors')); if (!$user->admin) accessforbidden(); @@ -212,9 +208,9 @@ print "
\n"; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($optioncss != '') $param.='&optioncss='.$optioncss; -if (defaulturl) $param.='&defaulturl='.urlencode(defaulturl); -if (defaultkey) $param.='&defaultkey='.urlencode(defaultkey); -if (defaultvalue) $param.='&defaultvalue='.urlencode(defaultvalue); +if ($defaulturl) $param.='&defaulturl='.urlencode($defaulturl); +if ($defaultkey) $param.='&defaultkey='.urlencode($defaultkey); +if ($defaultvalue) $param.='&defaultvalue='.urlencode($defaultvalue); print '
entity) && $debug)?'?debug=1':'').'" method="POST">'; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 37f66427225..ae3c43c5b24 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) accessforbidden(); @@ -144,7 +145,7 @@ if ($action == 'update') $plus=''; if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $plus = '_PERCENTAGE'; // Update values - for($i=0;$i<4;$i++) { + for($i=0; $i<4; $i++) { if(isset($_POST['MAIN_METEO'.$plus.'_LEVEL'.$i])) dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'),'chaine',0,'',$conf->entity); } @@ -172,7 +173,6 @@ if ($action == 'edit') print ''; print ''; print ''; - $var=true; print ''; print ''; @@ -215,7 +215,6 @@ else print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; print ''; - $var=true; foreach($modules as $module => $delays) { @@ -241,7 +240,6 @@ else print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; print ''; - $var=false; print ''; print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fbb0b5f38c5..65ceb912ea9 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent @@ -41,14 +41,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; -$langs->load("errors"); -$langs->load("admin"); -$langs->load("main"); -$langs->load("companies"); -$langs->load("resource"); -$langs->load("holiday"); -$langs->load("accountancy"); -$langs->load("hrm"); +// Load translation files required by the page +$langs->loadLangs(array("errors","admin","main","companies","resource","holiday","accountancy","hrm","orders","contracts","projects","propal","bills","interventions")); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $confirm=GETPOST('confirm','alpha'); @@ -60,6 +54,7 @@ $code=GETPOST('code','alpha'); $allowed=$user->admin; if ($id == 7 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Tax page allowed to manager of chart account if ($id == 10 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Vat page allowed to manager of chart account +if ($id == 17 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with type of expense report and accounting account allowed to manager of chart account if (! $allowed) accessforbidden(); $acts[0] = "activate"; @@ -383,8 +378,8 @@ $tabrowid[8] = "id"; $tabrowid[9] = "code_iso"; $tabrowid[10]= ""; $tabrowid[11]= "rowid"; -$tabrowid[12]= "rowid"; -$tabrowid[13]= "id"; +$tabrowid[12]= ""; +$tabrowid[13]= ""; $tabrowid[14]= ""; $tabrowid[15]= ""; $tabrowid[16]= "code"; @@ -543,33 +538,27 @@ $elementList = array(); $sourceList=array(); if ($id == 11) { - $langs->load("orders"); - $langs->load("contracts"); - $langs->load("projects"); - $langs->load("propal"); - $langs->load("bills"); - $langs->load("interventions"); $elementList = array( '' => '', 'societe' => $langs->trans('ThirdParty'), // 'proposal' => $langs->trans('Proposal'), // 'order' => $langs->trans('Order'), // 'invoice' => $langs->trans('Bill'), - 'invoice_supplier' => $langs->trans('SupplierBill'), + 'supplier_proposal' => $langs->trans('SupplierProposal'), 'order_supplier' => $langs->trans('SupplierOrder'), + 'invoice_supplier' => $langs->trans('SupplierBill'), // 'intervention' => $langs->trans('InterventionCard'), // 'contract' => $langs->trans('Contract'), 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), 'agenda' => $langs->trans('Agenda'), + 'resource' => $langs->trans('Resource'), // old deprecated - 'contrat' => $langs->trans('Contract'), 'propal' => $langs->trans('Proposal'), 'commande' => $langs->trans('Order'), 'facture' => $langs->trans('Bill'), - 'resource' => $langs->trans('Resource'), -// 'facture_fourn' => $langs->trans('SupplierBill'), - 'fichinter' => $langs->trans('InterventionCard') + 'fichinter' => $langs->trans('InterventionCard'), + 'contrat' => $langs->trans('Contract') ); if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); @@ -965,14 +954,14 @@ if (empty($id)) print "
\n"; -$param = '&id='.$id; -if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id; +$param = '&id='.urlencode($id); +if ($search_country_id > 0) $param.= '&search_country_id='.urlencode($search_country_id); if ($search_code != '') $param.= '&search_code='.urlencode($search_country_id); if ($entity != '') $param.= '&entity=' . (int) $entity; $paramwithsearch = $param; -if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder; -if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield; -if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha'); +if ($sortorder) $paramwithsearch.= '&sortorder='.urlencode($sortorder); +if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield); +if (GETPOST('from')) $paramwithsearch.= '&from='.urlencode(GETPOST('from','alpha')); // Confirmation de la suppression de la ligne @@ -999,10 +988,10 @@ if ($id) { // If sort order is "country", we use country_code instead if ($sortfield == 'country') $sortfield='country_code'; - $sql.= " ORDER BY ".$sortfield; + $sql.= " ORDER BY ".$db->escape($sortfield); if ($sortorder) { - $sql.=" ".strtoupper($sortorder); + $sql.=" ".strtoupper($db->escape($sortorder)); } $sql.=", "; // Clear the required sort criteria for the tabsqlsort to be able to force it with selected value diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index 10653df9dc0..de3ca683519 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -118,9 +118,9 @@ class PrestaShopWebservice public function executeRequest($url, $curl_params = array()) { $defaultParams = array( - CURLOPT_HEADER => TRUE, - CURLOPT_RETURNTRANSFER => TRUE, - CURLINFO_HEADER_OUT => TRUE, + CURLOPT_HEADER => true, + CURLOPT_RETURNTRANSFER => true, + CURLINFO_HEADER_OUT => true, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => $this->key.':', CURLOPT_HTTPHEADER => array( 'Expect:' ) diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index dd9e748de02..dc2f3e489f7 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) accessforbidden(); @@ -33,7 +34,7 @@ if (! $user->admin) accessforbidden(); /* * Action */ -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) @@ -47,7 +48,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -if (preg_match('/del_(.*)/',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -80,7 +81,6 @@ print '
'; print ''."\n"; print ''; -$var=true; $form = new Form($db); // Mail required for members @@ -110,4 +110,4 @@ print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_METEO").'' . yn($conf->global->MAIN_DISABLE_METEO) . '
 '.$langs->trans("Value").'
'; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index b2d9bd97980..1d1ec548853 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("users","admin","other")); $action=GETPOST('action','aZ09'); @@ -42,7 +41,6 @@ $securityevent=new Events($db); $eventstolog=$securityevent->eventstolog; - /* * Actions */ @@ -88,8 +86,6 @@ $head=security_prepare_head(); dol_fiche_head($head, 'audit', $langs->trans("Security"), -1); - -$var=true; print ""; print ""; print ""; @@ -98,8 +94,7 @@ print "\n"; foreach ($eventstolog as $key => $arr) { if ($arr['id']) - { - + { print ''; print ''; print '\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/expensereport/doc"); @@ -376,7 +371,6 @@ foreach ($dirmodels as $reldir) if (file_exists($dir.'/'.$file)) { - $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -480,7 +474,6 @@ print ''; print ''; print ''; print "\n"; -$var=true; $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); @@ -488,7 +481,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; echo ''; echo ''; - + if ($Tab['active'] == 0) continue; - + $tranche=1; - $var = true; + foreach ($Tab['ranges'] as $k => $range) { if (isset($Tab['ranges'][$k+1])) $label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k+1]->range_ik-1)); else $label = $langs->trans('expenseReportRangeMoreThan', $range->range_ik); - + if ($range->range_active == 0) $label = $form->textwithpicto($label, $langs->trans('expenseReportRangeDisabled'), 1, 'help', '', 0, 3); - - echo ''; - + + echo ''; + // Label echo ''; - + // Offset echo ''; - + // Total for one echo ''; - + // Action echo ''; - + echo ''; - $var=!$var; } } @@ -185,4 +181,4 @@ echo ''; dol_fiche_end(); llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 26312f708d9..b1d65b8635b 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -30,11 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_rule.class.php'; -$langs->load('admin'); -$langs->load('other'); -$langs->load('trips'); -$langs->load('errors'); -$langs->load('dict'); +// Load translation files required by the page +$langs->loadLangs(array("admin","other","trips","errors","dict")); if (!$user->admin) accessforbidden(); @@ -57,17 +54,17 @@ $amount = GETPOST('amount'); $restrictive = GETPOST('restrictive'); $object = new ExpenseReportRule($db); -if (!empty($id)) +if (!empty($id)) { $result = $object->fetch($id); if ($result < 0) dol_print_error('', $object->error, $object->errors); } - + // TODO do action if ($action == 'save') { $error = 0; - + // check parameters if (empty($apply_to)) { $error++; @@ -93,11 +90,11 @@ if ($action == 'save') $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpenseReportLimitAmount")), null, 'errors'); } - + if (empty($error)) { $object->setValues($_POST); - + if($apply_to=='U'){ $object->fk_user=$fk_user; $object->fk_usergroup=0; @@ -114,13 +111,13 @@ if ($action == 'save') $object->dates = $dates; $object->datee = $datee; - + $object->entity = $conf->entity; $res = $object->create($user); if ($res > 0) setEventMessages($langs->trans('ExpenseReportRuleSave'), null); else dol_print_error($object->db); - + header('Location: '.$_SERVER['PHP_SELF']); exit; } @@ -129,7 +126,7 @@ elseif ($action == 'delete') { // TODO add confirm $res = $object->delete($user); - + if ($res < 0) dol_print_error($object->db); header('Location: '.$_SERVER['PHP_SELF']); @@ -145,7 +142,7 @@ $tab_rules_type = array('EX_DAY' => $langs->trans('Day'), 'EX_MON' => $langs->tr * View */ -llxHeader(); +llxHeader('',$langs->trans("ExpenseReportsSetup")); $form=new Form($db); @@ -176,8 +173,7 @@ if ($action != 'edit') echo ''; echo ''; - $var=true; - echo ''; + echo ''; echo ''; echo '
".$langs->trans("LogEvents")."
'.$arr['id'].''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 442a85c9c6a..eb18f904229 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -6,7 +6,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2018 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 @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; -$langs->load("admin"); -$langs->load("sendings"); -$langs->load("deliveries"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("admin", "sendings", "deliveries", "other")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index a12ed1f9b34..af49e5bf064 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); -$langs->load("deliveries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries')); $extrafields = new ExtraFields($db); diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 073451eba6e..5567e9480e8 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -37,9 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 3806a17c99f..1002b146113 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2018 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 @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("trips"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'trips', 'other')); if (! $user->admin) accessforbidden(); @@ -195,7 +193,7 @@ else if ($action == 'setoptions') $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); -llxHeader(); +llxHeader('',$langs->trans("ExpenseReportsSetup")); $form=new Form($db); @@ -233,8 +231,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; - while (($file = readdir($handle))!==false) { if (substr($file, 0, 18) == 'mod_expensereport_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -351,7 +347,6 @@ print "
'.$langs->trans("Parameter").'
'; print $form->textwithpicto($langs->trans("FreeLegalTextOnExpenseReports"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; $variablename='EXPENSEREPORT_FREE_TEXT'; diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index db06f06d84a..8db81edb869 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("errors"); -$langs->load("trips"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'trips', 'other')); $extrafields = new ExtraFields($db); $form = new Form($db); @@ -67,7 +65,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; $textobject=$langs->transnoentitiesnoconv("expensereports"); -llxHeader('',$langs->trans("expensereportsSetup")); +llxHeader('',$langs->trans("ExpenseReportsSetup")); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'title_setup'); diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index a3bb7c4fc91..db7100d5928 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -30,11 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php'; -$langs->load('admin'); -$langs->load('other'); -$langs->load('trips'); -$langs->load('errors'); -$langs->load('dict'); +// Load translation files required by the page +$langs->loadLangs(array("admin","trips","errors","other","dict")); if (!$user->admin) accessforbidden(); @@ -58,12 +55,12 @@ if ($action == 'updateik') $result = $expIk->fetch($id); if ($result < 0) dol_print_error('', $expIk->error, $expIk->errors); } - + $expIk->setValues($_POST); $result = $expIk->create($user); - + if ($result > 0) setEventMessages('SetupSaved', null, 'mesgs'); - + header('Location: '.$_SERVER['PHP_SELF']); exit; } @@ -74,11 +71,11 @@ elseif ($action == 'delete') // TODO add confirm { $result = $expIk->fetch($id); if ($result < 0) dol_print_error('', $expIk->error, $expIk->errors); - + $expIk->delete($user); } - - + + header('Location: '.$_SERVER['PHP_SELF']); exit; } @@ -89,7 +86,7 @@ $rangesbycateg = ExpenseReportIk::getAllRanges(); * View */ -llxHeader(); +llxHeader('',$langs->trans("ExpenseReportsSetup")); $form=new Form($db); @@ -125,23 +122,23 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) echo '
'.$langs->trans('expenseReportTotalForFive').' 
['.$langs->trans('RangeNum', $tranche++).'] - '.$label.''; if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) echo ''; @@ -152,10 +149,10 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) echo ''; else echo ($range->ik->id > 0 ? $range->ik->coef : $langs->trans('expenseReportCoefUndefined')); echo ''.$langs->trans('expenseReportPrintExample', price($range->ik->offset + 5 * $range->ik->coef)).''; if ($range->range_active == 1) @@ -173,9 +170,8 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) } } echo '
 
'; echo '
'.$form->selectarray('apply_to', $tab_apply, '', 0).'
'; echo '
'.$form->select_dolusers('', 'fk_user').'
'; @@ -194,7 +190,7 @@ if ($action != 'edit') echo '
'; - echo ''; + echo ''; } @@ -220,11 +216,10 @@ echo '
'.$langs->trans('ExpenseReportRestrictive').' 
'; if ($action == 'edit' && $object->id == $rule->id) { @@ -240,8 +235,8 @@ foreach ($rules as $rule) elseif ($rule->fk_user > 0) echo $tab_apply['U'].' ('.$rule->getUserName().')'; } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -250,7 +245,7 @@ foreach ($rules as $rule) else { if ($rule->fk_c_type_fees == -1) echo $langs->trans('AllExpenseReport'); - else + else { $key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id'); if ($key != $langs->trans($key)) echo $langs->trans($key); @@ -258,9 +253,8 @@ foreach ($rules as $rule) } } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -271,8 +265,8 @@ foreach ($rules as $rule) echo $tab_rules_type[$rule->code_expense_rules_type]; } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -283,8 +277,8 @@ foreach ($rules as $rule) echo dol_print_date($rule->dates, 'day'); } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -295,8 +289,8 @@ foreach ($rules as $rule) echo dol_print_date($rule->datee, 'day'); } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -307,8 +301,8 @@ foreach ($rules as $rule) echo price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency); } echo ''; if ($action == 'edit' && $object->id == $rule->id) { @@ -319,8 +313,8 @@ foreach ($rules as $rule) echo yn($rule->restrictive, 1, 1); } echo ''; if ($object->id != $rule->id) { @@ -333,9 +327,8 @@ foreach ($rules as $rule) echo ''.$langs->trans('Cancel').''; } echo '
'; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 4a184aa95a0..e8683dfc4ee 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -31,6 +31,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php'; +// Load translation files required by the page $langs->load("admin"); // Security check @@ -250,8 +251,6 @@ if ($resql) $rssparser=new RssParser($db); $result = $rssparser->parser($conf->global->$keyrssurl, 5, 300, $conf->externalrss->dir_temp); - $var=true; - print "
"; print "
"; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 9ffe45dec40..f00d125a4d5 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load('other'); -$langs->load('bills'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'other', 'bills')); if (! $user->admin) accessforbidden(); @@ -284,8 +282,6 @@ foreach ($dirmodels as $reldir) $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')) @@ -316,7 +312,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var = !$var; print '
'; echo preg_replace('/\-.*$/','',preg_replace('/mod_facture_/','',preg_replace('/\.php$/','',$file))); print "\n"; @@ -470,7 +465,6 @@ print "
'; print (empty($module->name)?$name:$module->name); print "\n"; @@ -598,7 +591,6 @@ print ''; print ''; print ''; -$var=True; print ''; print ''; print ''; print ''; print "\n"; -$var=true; // Force date validation -$var=! $var; print ''; print ''; print ''; @@ -717,7 +706,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; print ''; print ''; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 70b79acb931..19d4a4cc772 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -$langs->load("admin"); -$langs->load("fckeditor"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'fckeditor')); $action = GETPOST('action','alpha'); // Possible modes are: @@ -139,8 +139,6 @@ $linkback=''; -$var=true; - if (empty($conf->use_javascript_ajax)) { setEventMessages(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), null, 'errors'); @@ -158,7 +156,6 @@ else { // Si condition non remplie, on ne propose pas l'option if (! $conditions[$const]) continue; - print ''; print ''; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 46c9d5fec9e..a216f2d4ab7 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("interventions"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'interventions', 'other')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index bf588ca90ae..9c944324527 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -30,8 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("admin","errors")); $action = GETPOST('action','aZ09'); @@ -94,7 +94,6 @@ else } // Mode -$var=true; print ''; print ''; print ''; @@ -105,7 +104,6 @@ print ''; print "\n"; - print ''; print ''; print "\n"; // Type - print ''; // Version - print ''; // Serveur primaire - print ''; // Serveur secondaire - print ''; // Port - print ''; // DNserver - print ''; // Utiliser TLS - print ''; print "\n"; // DNAdmin - print ''; // Pass - print ''; } if (! empty($arrayfields['p.ref_client']['checked'])) { print ''; } if (! empty($arrayfields['pr.ref']['checked'])) { print ''; } if (! empty($arrayfields['s.nom']['checked'])) { print ''; } if (! empty($arrayfields['s.town']['checked'])) print ''; @@ -513,15 +595,16 @@ if ($resql) { print ''; } // Date if (! empty($arrayfields['p.date']['checked'])) { - print ''; @@ -529,34 +612,59 @@ if ($resql) // Date end if (! empty($arrayfields['p.fin_validite']['checked'])) { - print ''; + print ''; + } + // Date delivery + if (! empty($arrayfields['p.date_livraison']['checked'])) + { + print ''; + } + // Availability + if (! empty($arrayfields['ava.rowid']['checked'])) + { + print ''; } if (! empty($arrayfields['p.total_ht']['checked'])) { // Amount print ''; } if (! empty($arrayfields['p.total_vat']['checked'])) { // Amount print ''; } if (! empty($arrayfields['p.total_ttc']['checked'])) { // Amount print ''; } if (! empty($arrayfields['u.login']['checked'])) { // Author print ''; } // Extra fields @@ -607,6 +715,8 @@ if ($resql) if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['p.date']['checked'])) print_liste_field_titre($arrayfields['p.date']['label'],$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'],$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['p.date_livraison']['checked'])) print_liste_field_titre($arrayfields['p.date_livraison']['label'],$_SERVER["PHP_SELF"],'ddelivery','',$param, 'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['ava.rowid']['checked'])) print_liste_field_titre($arrayfields['ava.rowid']['label'],$_SERVER["PHP_SELF"],'availability','',$param, '',$sortfield,$sortorder); if (! empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'],$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'],$_SERVER["PHP_SELF"],'p.tva','',$param, 'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'],$_SERVER["PHP_SELF"],'p.total','',$param, 'align="right"',$sortfield,$sortorder); @@ -772,6 +882,28 @@ if ($resql) } if (! $i) $totalarray['nbfield']++; } + // Date delivery + if (! empty($arrayfields['p.date_livraison']['checked'])) + { + if ($obj->ddelivery) + { + print ''; + } + else + { + print ''; + } + if (! $i) $totalarray['nbfield']++; + } + // Availability + if (! empty($arrayfields['ava.rowid']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } // Amount HT if (! empty($arrayfields['p.total_ht']['checked'])) diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 17e53b89948..607cff245d9 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -33,10 +33,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('propal'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('propal', 'compta', 'bills', 'companies')); $id = GETPOST('id','int'); $ref=GETPOST('ref','alpha'); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 273862f68bf..ac6b42c45d8 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -54,11 +54,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$langs->load('orders'); -$langs->load('companies'); -$langs->load('other'); -$langs->load('suppliers'); -$langs->load('supplier_proposal'); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal')); /* @@ -329,7 +326,7 @@ print '
'; // Show graphs -print '
'; @@ -662,7 +654,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE clos = 0"; $sql.= " AND courant = 1"; $sql.= " AND entity IN (".getEntity('bank_account').")"; -$var=True; + $resql=$db->query($sql); if ($resql) { @@ -670,7 +662,6 @@ if ($resql) $i = 0; while ($i < $num) { - $row = $db->fetch_row($resql); print ''.$langs->trans("Value").' 
'.img_object("",$picto[$const]).''.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 03f3d364cca..62f17d5cb1d 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -32,26 +32,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; -$langs->load("admin"); -$langs->load("languages"); -$langs->load("other"); - -$langs->load("companies"); -$langs->load("products"); -$langs->load("members"); -$langs->load("projects"); -$langs->load("hrm"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'projects', 'hrm', 'agenda')); if (! $user->admin) accessforbidden(); $action = GETPOST('action','aZ09'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'adminihm'; // To manage different context of search if (! defined("MAIN_MOTD")) define("MAIN_MOTD",""); -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$contextpage=array('adminihm','globaladmin'); -$hookmanager->initHooks($contextpage); /* @@ -110,10 +100,18 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val,'chaine',0,'',$conf->entity); + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val,'chaine',0,'',$conf->entity); + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val,'chaine',0,'',$conf->entity); + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'),array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val,'chaine',0,'',$conf->entity); + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'),array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val,'chaine',0,'',$conf->entity); @@ -128,17 +126,13 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val,'chaine',0,'',$conf->entity); - $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val,'chaine',0,'',$conf->entity); - - if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", '0', 'chaine', 0, '', $conf->entity); // If empty, we set to '0' ('000000' is for black) - else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity); - $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val,'chaine',0,'',$conf->entity); + if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", '0', 'chaine', 0, '', $conf->entity); // If empty, we set to '0' ('000000' is for black) + else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); @@ -545,6 +539,8 @@ else // Show print '
'; // Login page + print '
'; + print ''; print ''; @@ -575,6 +571,7 @@ else // Show print ''; print '
'.$langs->trans("LoginPage").'
'."\n"; + print '
'; print '
'; print ''.$langs->trans("Modify").''; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 0aa8b14199d..6542cec1174 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -24,8 +24,8 @@ require '../main.inc.php'; -$langs->load("admin"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'companies')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 5655c0c2714..6776cfb1480 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) @@ -102,7 +103,6 @@ if (! function_exists("ldap_connect")) } -$var=true; $form=new Form($db); @@ -180,7 +180,6 @@ print '
'.$langs->trans("Example").'
'.$langs->trans("Type").''; $arraylist=array(); $arraylist['activedirectory']='Active Directory'; @@ -190,7 +189,6 @@ print $form->selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); print ' 
'.$langs->trans("Version").''; $arraylist=array(); $arraylist['3']='Version 3'; @@ -199,21 +197,18 @@ print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global- print ''.$langs->trans("LDAPServerProtocolVersion").'
'; print $langs->trans("LDAPPrimaryServer").''; print ''; print ''.$langs->trans("LDAPServerExample").'
'; print $langs->trans("LDAPSecondaryServer").''; print ''; print ''.$langs->trans("LDAPServerExample").'
'.$langs->trans("LDAPServerPort").''; if (! empty($conf->global->LDAP_SERVER_PORT)) { @@ -226,13 +221,11 @@ else print ''.$langs->trans("LDAPServerPortExample").'
'.$langs->trans("LDAPServerDn").''; print ''; print ''.$langs->trans("LDAPServerDnExample").'
'.$langs->trans("LDAPServerUseTLS").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); @@ -245,13 +238,11 @@ print ''.$langs->trans("ForANonAnonymousAccess").'
'.$langs->trans("LDAPAdminDn").''; print ''; print ''.$langs->trans("LDAPAdminDnExample").'
'.$langs->trans("LDAPPassword").''; if (! empty($conf->global->LDAP_ADMIN_PASS)) { diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 07910185956..3188bf6e58a 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -32,8 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("admin","errors")); if (!$user->admin) accessforbidden(); @@ -117,15 +117,12 @@ print ''; print ''; print ''; -$var=true; print ''; print ''; print "\n"; - // DN Pour les contacts - print ''; @@ -133,7 +130,6 @@ print ''; print ''; // List of object class used to define attributes in structure - print ''; @@ -143,7 +139,6 @@ print ''; print '
'.$langs->trans("LDAPSynchronizeContacts").'
'.$langs->trans("LDAPContactDn").''; print ''; print ''.$langs->trans("LDAPContactDnExample").' 
'.$langs->trans("LDAPContactObjectClassList").''; print ''; print ''.$langs->trans("LDAPContactObjectClassListExample").'
'; print '
'; print ''; -$var=true; print ''; print ''; @@ -152,7 +147,6 @@ print ''; print "\n"; // Common name - print ''; @@ -160,7 +154,6 @@ print ''; @@ -168,7 +161,6 @@ print ''; @@ -176,7 +168,6 @@ print ''; @@ -184,7 +175,6 @@ print ''; @@ -192,7 +182,6 @@ print ''; @@ -200,7 +189,6 @@ print ''; @@ -208,7 +196,6 @@ print ''; @@ -216,7 +203,6 @@ print ''; @@ -224,7 +210,6 @@ print ''; @@ -232,7 +217,6 @@ print ''; @@ -240,7 +224,6 @@ print ''; @@ -248,7 +231,6 @@ print ''; @@ -256,7 +238,6 @@ print ''; diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 5a4e36b7792..4ae6ce9ad97 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("admin","errors")); if (!$user->admin) accessforbidden(); @@ -109,14 +109,12 @@ print ''; $form=new Form($db); print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").''.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").''.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").''.$langs->trans("LDAPFieldHomePhone").''; print ''; print ''.$langs->trans("LDAPFieldHomePhoneExample").''.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").''.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").''.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").''.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").''.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").''.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").''.$langs->trans("LDAPFieldCountry").''; print ''; print ' 
'; -$var=true; print ''; print ''; print "\n"; // DN pour les groupes - print ''; @@ -124,7 +122,6 @@ print ''; print ''; // List of object class used to define attributes in structure - print ''; @@ -134,7 +131,6 @@ print ''; print '
'.$langs->trans("LDAPSynchronizeGroups").'
'.$langs->trans("LDAPGroupDn").''; print ''; print ''.$langs->trans("LDAPGroupDnExample").' 
'.$langs->trans("LDAPGroupObjectClassList").''; print ''; print ''.$langs->trans("LDAPGroupObjectClassListExample").'
'; print '
'; print ''; -$var=true; print ''; print ''; @@ -145,7 +141,6 @@ print "\n"; // Filtre // Common name - print ''; @@ -162,7 +157,6 @@ print ''; */ // Description - print ''; @@ -170,7 +164,6 @@ print ''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index a6385c9690c..616eb99a8da 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors')); if (!$user->admin) accessforbidden(); @@ -133,17 +133,13 @@ dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1); print $langs->trans("LDAPDescMembers").'
'; print '
'; - print '
'.$langs->trans("LDAPDolibarrMapping").'
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldCommonNameExample").'
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").''.$langs->trans("LDAPFieldGroupMembers").''; print ''; print ''.$langs->trans("LDAPFieldGroupMembersExample").'
'; -$var=true; - print ''; print ''; print "\n"; // DN Pour les adherents - print ''; @@ -151,7 +147,6 @@ print ''; print ''; // List of object class used to define attributes in structure - print ''; @@ -159,7 +154,6 @@ print ''; print ''; // Filter, used to filter search - print ''; @@ -169,7 +163,6 @@ print ''; print '
'.$langs->trans("LDAPSynchronizeMembers").'
'.$langs->trans("LDAPMemberDn").''; print ''; print ''.$langs->trans("LDAPMemberDnExample").' 
'.$langs->trans("LDAPMemberObjectClassList").''; print ''; print ''.$langs->trans("LDAPMemberObjectClassListExample").' 
'.$langs->trans("LDAPFilterConnection").''; print ''; print ''.$langs->trans("LDAPFilterConnectionExample").'
'; print '
'; print ''; -$var=true; print ''; print ''; @@ -180,7 +173,6 @@ print "\n"; // Filtre // Common name - print ''; @@ -188,7 +180,6 @@ print ''; @@ -196,7 +187,6 @@ print ''; @@ -204,7 +194,6 @@ print ''; print ''; // Login unix - print ''; @@ -212,7 +201,6 @@ print ''; @@ -220,7 +208,6 @@ print ''; @@ -228,7 +215,6 @@ print ''; print ''; // Password crypted - print ''; @@ -236,7 +222,6 @@ print ''; print ''; // Mail - print ''; @@ -244,7 +229,6 @@ print ''; @@ -260,7 +244,6 @@ print ''; print ''; // Mobile - print ''; @@ -268,7 +251,6 @@ print ''; print ''; // Skype - print ''; @@ -276,7 +258,6 @@ print ''; print ''; // Fax - print ''; @@ -284,7 +265,6 @@ print ''; print ''; // Company - print ''; @@ -292,7 +272,6 @@ print ''; print ''; // Address - print ''; @@ -300,7 +279,6 @@ print ''; print ''; // ZIP - print ''; @@ -308,7 +286,6 @@ print ''; print ''; // TOWN - print ''; @@ -316,7 +293,6 @@ print ''; print ''; // COUNTRY - print ''; @@ -324,7 +300,6 @@ print ''; print ''; // Description - print ''; @@ -332,7 +307,6 @@ print ''; print ''; // Public Note - print ''; @@ -348,7 +322,6 @@ print ''; print ''; // Status - print ''; @@ -364,7 +337,6 @@ print ''; print ''; // First subscription amount - print ''; @@ -372,7 +344,6 @@ print ''; print ''; // Last subscription date - print ''; @@ -380,7 +351,6 @@ print ''; print ''; // Last subscription amount - print ''; @@ -388,7 +358,6 @@ print ''; print ''; // End last subscriptions - print ''; diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 2c08ec9fae8..e45857f2f38 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors')); if (!$user->admin) accessforbidden(); @@ -108,14 +108,12 @@ print ''; $form=new Form($db); print '
'.$langs->trans("LDAPDolibarrMapping").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").' 
'.$langs->trans("LDAPFieldLoginUnix").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").''.$langs->trans("LDAPFieldLoginSamba").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").''.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").' 
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").' 
'.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").' 
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").' 
'.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").' 
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").' 
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").' 
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").' 
'.$langs->trans("LDAPFieldCountry").''; print ''; print '  
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").' 
'.$langs->trans("LDAPFieldNotePublic").''; print ''; print ''.$langs->trans("LDAPFieldNotePublicExample").' 
'.$langs->trans("LDAPFieldStatus").''; print ''; print '  
'.$langs->trans("LDAPFieldFirstSubscriptionAmount").''; print ''; print '  
'.$langs->trans("LDAPFieldLastSubscriptionDate").''; print ''; print '  
'.$langs->trans("LDAPFieldLastSubscriptionAmount").''; print ''; print '  
'.$langs->trans("LDAPFieldEndLastSubscription").''; print ''; print ' 
'; -$var=true; print ''; print ''; print "\n"; // DN pour les types de membres - print ''; @@ -123,7 +121,6 @@ print ''; print ''; // List of object class used to define attributes in structure - print ''; @@ -133,7 +130,6 @@ print ''; print '
'.$langs->trans("LDAPSynchronizeMembersTypes").'
'.$langs->trans("LDAPMemberTypeDn").''; print ''; print ''.$langs->trans("LDAPMemberTypepDnExample").' 
'.$langs->trans("LDAPMemberTypeObjectClassList").''; print ''; print ''.$langs->trans("LDAPMemberTypeObjectClassListExample").'
'; print '
'; print ''; -$var=true; print ''; print ''; @@ -144,7 +140,6 @@ print "\n"; // Filtre // Common name - print ''; @@ -152,7 +147,6 @@ print ''; @@ -160,7 +154,6 @@ print ''; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index a2e40abfed2..8b11069fc61 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("admin"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors')); if (!$user->admin) accessforbidden(); @@ -124,17 +124,13 @@ print $langs->trans("LDAPDescUsers").'
'; print '
'; - - print '
'.$langs->trans("LDAPDolibarrMapping").'
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldCommonNameExample").''.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").''.$langs->trans("LDAPFieldGroupMembers").''; print ''; print ''.$langs->trans("LDAPFieldGroupMembersExample").'
'; -$var=true; print ''; print ''; print "\n"; // DN Pour les utilisateurs - print ''; @@ -142,7 +138,6 @@ print ''; print ''; // List of object class used to define attributes in structure - print ''; @@ -150,7 +145,6 @@ print ''; print ''; // Filter, used to filter search - print ''; @@ -160,7 +154,6 @@ print ''; print '
'.$langs->trans("LDAPSynchronizeUsers").'
'.$langs->trans("LDAPUserDn").''; print ''; print ''.$langs->trans("LDAPUserDnExample").' 
'.$langs->trans("LDAPUserObjectClassList").''; print ''; print ''.$langs->trans("LDAPUserObjectClassListExample").' 
'.$langs->trans("LDAPFilterConnection").''; print ''; print ''.$langs->trans("LDAPFilterConnectionExample").'
'; print '
'; print ''; -$var=true; print ''; print ''; @@ -169,7 +162,6 @@ print ''; print "\n"; // Common name - print ''; @@ -177,7 +169,6 @@ print ''; @@ -185,7 +176,6 @@ print ''; @@ -193,7 +183,6 @@ print ''; @@ -201,7 +190,6 @@ print ''; @@ -209,7 +197,6 @@ print ''; @@ -217,7 +204,6 @@ print ''; print ''; // Password crypted - print ''; @@ -225,7 +211,6 @@ print ''; print ''; // Mail - print ''; @@ -233,7 +218,6 @@ print ''; @@ -241,7 +225,6 @@ print ''; @@ -249,7 +232,6 @@ print ''; @@ -257,7 +239,6 @@ print ''; @@ -265,7 +246,6 @@ print ''; @@ -273,7 +253,6 @@ print ''; print ''; // Address - print ''; @@ -281,7 +260,6 @@ print ''; print ''; // ZIP - print ''; @@ -289,7 +267,6 @@ print ''; print ''; // TOWN - print ''; @@ -297,7 +274,6 @@ print ''; print ''; // COUNTRY - print ''; @@ -305,7 +281,6 @@ print ''; print ''; // Title - print ''; @@ -313,7 +288,6 @@ print ''; print ''; // Note - print ''; @@ -321,7 +295,6 @@ print ''; print ''; // Sid - print ''; diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 36b0d4d0df1..e9389b0271d 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -26,9 +26,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin')); if (! $user->admin) accessforbidden(); @@ -38,8 +37,8 @@ if ($action == 'update') { $error=0; $MAXDEC=8; - if ($_POST["MAIN_MAX_DECIMALS_UNIT"] > $MAXDEC - || $_POST["MAIN_MAX_DECIMALS_TOT"] > $MAXDEC + if ($_POST["MAIN_MAX_DECIMALS_UNIT"] > $MAXDEC + || $_POST["MAIN_MAX_DECIMALS_TOT"] > $MAXDEC || $_POST["MAIN_MAX_DECIMALS_SHOWN"] > $MAXDEC) { $error++; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 4c18069b415..88ce717f005 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -6,8 +6,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand - * Copyright (C) 2015 Claudio Aschieri + * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2015 Claudio Aschieri * * 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 @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php'; -$langs->load("admin"); -$langs->load("sendings"); -$langs->load("deliveries"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("admin", "sendings", "deliveries", "other")); if (!$user->admin) accessforbidden(); @@ -216,7 +214,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -337,7 +334,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/livraison/doc/"); @@ -452,7 +448,6 @@ print ''; print ''; print ''; print "\n"; -$var=true; $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); @@ -460,7 +455,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; print ''; print ''; diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php index 5e9a6824899..6ccf798bc93 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/livraison_extrafields.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); -$langs->load("deliveries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries')); $extrafields = new ExtraFields($db); diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/livraisondet_extrafields.php index f563100a326..431d5c3c170 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/livraisondet_extrafields.php @@ -37,9 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 1b5fdafcbb2..3349ac0056a 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -28,8 +28,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; -$langs->load("admin"); -$langs->load("loan"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'loan')); // Security check if (!$user->admin) @@ -123,4 +123,4 @@ print "
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''; // Firstname - print '
'.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").''.$langs->trans("LDAPFieldLoginUnix").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").''; // Login samba - print '
'.$langs->trans("LDAPFieldLoginSamba").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").''.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''; // Phone - print '
'.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").''; // Mobile - print '
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").''.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").''; // Fax - print '
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").''; // Company - print '
'.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").' 
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").' 
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").' 
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").' 
'.$langs->trans("LDAPFieldCountry").''; print ''; print '  
'.$langs->trans("LDAPFieldTitle").''; print ''; print ''.$langs->trans("LDAPFieldTitleExample").' 
'.$langs->trans("Note").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").' 
'.$langs->trans("LDAPFieldSid").''; print ''; print ''.$langs->trans("LDAPFieldSidExample").'
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
\n"; print '
'; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 7abb16a0729..32fbdd4aeb6 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -27,8 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; -$langs->load("admin"); -$langs->load("mails"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "mails")); if (!$user->admin) accessforbidden(); @@ -60,7 +60,7 @@ if ($action == 'setvalue') // Create temporary encryption key if nedded $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - + if (! $error) { $db->commit(); @@ -105,34 +105,30 @@ print ''; print ''; print ''; -$var=true; - print ''; print ''; print ''; print ''; print "\n"; - print ''; - print ''; - print ''; + // Constant to add salt into the unsubscribe and check read tag. // It is also used as a security key parameter. @@ -142,6 +138,13 @@ print ''; +if (!empty($conf->use_javascript_ajax) && $conf->global->MAIN_FEATURES_LEVEL >=1) { + print ''; +} + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $langs->trans("MailingEMailFrom").''; print ''; if (!empty($conf->global->MAILING_EMAIL_FROM) && ! isValidEmail($conf->global->MAILING_EMAIL_FROM)) print ' '.img_warning($langs->trans("BadEMail")); print '
'; print $langs->trans("MailingEMailError").''; print ''; if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail")); print '
'; print $langs->trans("MailingDelay").''; print ''; print '
'; + print $langs->trans("MailAdvTargetRecipients").''; + print ajax_constantonoff('EMAILING_USE_ADVANCED_SELECTOR'); + print '
'; print '
'; diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index 89416a72e36..b831c13823f 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("mailmanspip"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "members", "mailmanspip")); if (! $user->admin) accessforbidden(); @@ -49,7 +48,7 @@ $testunsubscribeemail = GETPOST("testunsubscribeemail"); * Actions */ -// Action mise a jour ou ajout d'une constante +// Action updated or added a constant if ($action == 'update' || $action == 'add') { foreach($_POST['constname'] as $key => $val) @@ -156,9 +155,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup' $head = mailmanspip_admin_prepare_head(); - -$var=true; - if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 4d96f80689e..5b6a0841e76 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -27,12 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("mails"); -$langs->load("other"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors")); $action=GETPOST('action','alpha'); @@ -71,6 +67,7 @@ if ($action == 'update' && empty($_POST["cancel"])) { dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO"),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT"),'chaine',0,'',$conf->entity); // Send mode parameters dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT"),'chaine',0,'',$conf->entity); @@ -79,6 +76,11 @@ if ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"),'chaine',0,'',$conf->entity); + + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED"),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN"),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR"),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY"),'chaine',0,'',$conf->entity); // Content parameters dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity); @@ -147,75 +149,100 @@ if ($action == 'edit') { if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'mail\') { + console.log("I choose php mail mode"); jQuery(".drag").hide(); jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); jQuery("#MAIN_MAIL_EMAIL_TLS").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").prop("disabled", true); + jQuery(".dkim").hide(); '; if ($linuxlike) { print ' - jQuery("#MAIN_MAIL_SMTP_SERVER").hide(); - jQuery("#MAIN_MAIL_SMTP_PORT").hide(); - jQuery("#smtp_server_mess").show(); - jQuery("#smtp_port_mess").show(); - '; + jQuery("#MAIN_MAIL_SMTP_SERVER").hide(); + jQuery("#MAIN_MAIL_SMTP_PORT").hide(); + jQuery("#smtp_server_mess").show(); + jQuery("#smtp_port_mess").show();'; } else { - print ' - jQuery("#MAIN_MAIL_SMTP_SERVER").prop("disabled", true); - jQuery("#MAIN_MAIL_SMTP_PORT").prop("disabled", true); - jQuery("#smtp_server_mess").hide(); - jQuery("#smtp_port_mess").hide(); - '; - } - print ' + print ' + jQuery("#MAIN_MAIL_SMTP_SERVER").prop("disabled", true); + jQuery("#MAIN_MAIL_SMTP_PORT").prop("disabled", true); + jQuery("#smtp_server_mess").hide(); + jQuery("#smtp_port_mess").hide();'; + } + print ' } if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\') { + console.log("I choose smtps mode"); jQuery(".drag").show(); jQuery("#MAIN_MAIL_EMAIL_TLS").val('.$conf->global->MAIN_MAIL_EMAIL_TLS.'); jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS.'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").hide(); jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER").show(); jQuery("#MAIN_MAIL_SMTP_PORT").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); + jQuery(".dkim").hide(); } if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'swiftmailer\') { + console.log("I choose swiftmailer mode"); jQuery(".drag").show(); jQuery("#MAIN_MAIL_EMAIL_TLS").val('.$conf->global->MAIN_MAIL_EMAIL_TLS.'); jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS.'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").val('.$conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED.'); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN").show(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR").show(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").show(); jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER").show(); jQuery("#MAIN_MAIL_SMTP_PORT").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); + jQuery(".dkim").show(); } } initfields(); jQuery("#MAIN_MAIL_SENDMODE").change(function() { initfields(); }); - jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { + jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val() == 1) jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0); }); jQuery("#MAIN_MAIL_EMAIL_STARTTLS").change(function() { if (jQuery("#MAIN_MAIL_EMAIL_TLS").val() == 1) jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); - }); + }); })'; - print ''."\n"; + print ''."\n"; } print ''; @@ -229,13 +256,11 @@ if ($action == 'edit') clearstatcache(); - $var=true; print ''; print ''; // Disable - print ''; @@ -245,12 +270,16 @@ if ($action == 'edit') print ''; print ''; - // Separator + //Add user to select destinaries list + print ''; + + // Separator print ''; // Method - print ''; // Host server - print ''; // Port - print ''; } - // TLS - - print ''; // STARTTLS - print ''; - // Separator + // DKIM + print ''; + // DKIM Domain + print ''; + print ''; + + // DKIM Selector + print ''; + print ''; + + // DKIM PRIVATE KEY + print ''; + print ''; + + // Separator print ''; // From - print ''; print ''; @@ -435,22 +486,19 @@ if ($action == 'edit') } else dol_print_error($db);*/ - print ''; // Separator - print ''; // From - print ''; print ''; // Autocopy to - print ''; print ''; @@ -474,14 +522,10 @@ else print $langs->trans("EMailsDesc")."
\n"; print "
\n"; - - $var=true; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print '
'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''; + print $form->selectyesno('MAIN_MAIL_ENABLED_USER_DEST_SELECT',$conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT,1); + print '
 
'.$langs->trans("MAIN_MAIL_SENDMODE").''; // SuperAdministrator access only @@ -269,13 +298,12 @@ if ($action == 'edit') print '
'; if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); print ''; - print $langs->trans("SeeLocalSendMailSetup"); + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { @@ -289,7 +317,7 @@ if ($action == 'edit') { print ''; print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { @@ -302,13 +330,12 @@ if ($action == 'edit') print '
'; if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print ''; - print $langs->trans("SeeLocalSendMailSetup"); + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { @@ -322,7 +349,7 @@ if ($action == 'edit') { print ''; print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { @@ -374,9 +401,8 @@ if ($action == 'edit') print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + // TLS + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) @@ -389,7 +415,6 @@ if ($action == 'edit') print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { @@ -402,12 +427,38 @@ if ($action == 'edit') else print yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").''; + if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED',(! empty($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED)?$conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED:0),1); + } + else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").'
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").'
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").''; + print '
 
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; + print '
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE', $liste, $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE, 0); print '
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").'
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'
'; print ''; // Disable - print ''; // Force e-mail recipient @@ -489,12 +533,13 @@ else if (! empty($conf->global->MAIN_MAIL_FORCE_SENDTO) && ! isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail")); print ''; - // Separator + //Add user to select destinaries list + print ''; + // Separator print ''; // Method - print ''; // Host server - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { - print ''; + print ''; } else { @@ -513,10 +557,9 @@ else } // Port - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { - print ''; + print ''; } else { @@ -524,21 +567,18 @@ else } // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { print ''; } // TLS - print ''; // STARTTLS - print ''; - // Separator + if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer') + { + // DKIM + print ''; + + // Domain + print ''; + print ''; + + // Selector + print ''; + print ''; + + // PRIVATE KEY + print ''; + print ''; + } + + // Separator print ''; // From - print ''; print ''; // Separator - print ''; // Errors To - print ''; print ''; // Autocopy to - print ''; print ''; @@ -169,14 +165,12 @@ if ($result) $num = $db->num_rows($result); if ($num > 0) - { - $var = true; + { $i = 0; - while ($i < $num ) + while ($i < $num ) { $obj = $db->fetch_object($result); - print ''; print ''; diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index ddb0d4a8fc6..b4f2eaeb6f3 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; $id=GETPOST('id'); +// Load translation files required by the page $langs->load("mails"); // Security check diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index f2491b09336..87a390d4006 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -25,6 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; +// Load translation files required by the page $langs->load("mails"); // Security check @@ -32,7 +33,7 @@ $result=restrictedArea($user,'mailing'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $page = GETPOST("page",'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -103,12 +104,19 @@ if ($result) $title=$langs->trans("ListOfEMailings"); if ($filteremail) $title.=' ('.$langs->trans("SentTo",$filteremail).')'; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,"",$num); + + $newcardbutton=''; + if ($user->rights->mailing->creer) + { + $newcardbutton=''.$langs->trans('NewMailing').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } $i = 0; - $param = "&sall=".urlencode($sall); - if ($filteremail) $param.='&filteremail='.urlencode($filteremail); + $param = "&sall=".urlencode($sall); + if ($filteremail) $param.='&filteremail='.urlencode($filteremail); print ''; if ($optioncss != '') print ''; @@ -118,7 +126,9 @@ if ($result) print ''; print ''; - $moreforfilter = ''; + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '',$num, '', 'title_generic.png', 0, $newcardbutton); + + $moreforfilter = ''; print '
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''.yn($conf->global->MAIN_DISABLE_ALL_MAILS).'
'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'
 
'.$langs->trans("MAIN_MAIL_SENDMODE").''; $text=$listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text=$langs->trans("Undefined").img_warning(); @@ -502,10 +547,9 @@ else print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./','*',$conf->global->MAIN_MAIL_SMTPS_PW).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { @@ -548,11 +588,10 @@ else } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { @@ -562,15 +601,45 @@ else } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED); + } + else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").'' . $conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").'' . $conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").'' . $conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; + print '
 
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_EMAIL_FROM; if (! empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail")); @@ -625,18 +694,15 @@ else print '
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").''.$conf->global->MAIN_MAIL_ERRORS_TO; if (! empty($conf->global->MAIN_MAIL_ERRORS_TO) && ! isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail")); print '
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; if (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) @@ -664,7 +730,7 @@ else { if (function_exists('fsockopen') && $port && $server) { - print ''.$langs->trans("DoTestServerAvailability").''; + print ''.$langs->trans("DoTestServerAvailability").''; } } else @@ -672,11 +738,11 @@ else print ''.$langs->trans("DoTestServerAvailability").''; } - print ''.$langs->trans("DoTestSend").''; + print ''.$langs->trans("DoTestSend").''; if (! empty($conf->fckeditor->enabled)) { - print ''.$langs->trans("DoTestSendHTML").''; + print ''.$langs->trans("DoTestSendHTML").''; } print ''; @@ -753,7 +819,7 @@ else $formmail->fromalsorobot=1; $formmail->fromtype=(GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user')); $formmail->withfromreadonly=1; - $formmail->withsubstit=0; + $formmail->withsubstit=1; $formmail->withfrom=1; $formmail->witherrorsto=1; $formmail->withto=(! empty($_POST['sendto'])?$_POST['sendto']:($user->email?$user->email:1)); diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 1202e9817d3..91826f2be1d 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -27,12 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("mails"); -$langs->load("other"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); $action=GETPOST('action','alpha'); @@ -228,7 +224,6 @@ if ($action == 'edit') clearstatcache(); - $var=true; print ''; print ''; @@ -341,7 +336,6 @@ if ($action == 'edit') // PW if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { - $mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING)?$conf->global->MAIN_MAIL_SMTPS_PW_EMAILING:''); print ''; } elseif ($value == 'fk_user') @@ -661,7 +648,7 @@ if ($resql) elseif ($value == 'topic') print ''; elseif ($value == 'type_template') { - print ''; + print ''; } elseif (! in_array($value, array('content', 'content_lines'))) print ''; } @@ -695,7 +682,7 @@ if ($resql) if ($fieldlist[$field]=='fk_user') { $valuetoshow=$langs->trans("Owner"); } if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); } if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); } - if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); } + if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Code"); } if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } if ($fieldlist[$field]=='private') { $align='center'; } if ($fieldlist[$field]=='position') { $align='center'; } @@ -727,13 +714,13 @@ if ($resql) { $obj = $db->fetch_object($resql); - print ''; - if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) { + 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 + $reshook=$hookmanager->executeHooks('editEmailTemplateFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; // Show fields @@ -777,6 +764,7 @@ if ($resql) } if ($tmpfieldlist == 'content') { + print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist) . '
'; $okforextended = true; if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%'); @@ -787,12 +775,25 @@ if ($resql) print ''; } } + + print "\n"; } else { - $tmpaction = 'view'; + $keyforobj='type_template'; + if (! in_array($obj->$keyforobj, array_keys($elementList))) + { + $i++; + continue; // It means this is a type of template not into elementList (may be because enabled condition of this type is false because module is not enabled) + } + // TODO Test on 'enabled' + + + print ''; + + $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 + $reshook=$hookmanager->executeHooks('viewEmailTemplateFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; @@ -867,7 +868,7 @@ if ($resql) print ""; // Modify link / Delete link - print ''; - /* $fieldsforcontent = array('content'); if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) @@ -904,8 +904,9 @@ if ($resql) } }*/ + + print "\n"; } - print "\n"; $i++; @@ -990,7 +991,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') { $selectedlang = $langs->defaultlang; if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]}; - print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1); + print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150'); } else { @@ -1016,7 +1017,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } else { - print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1); + print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200'); } print ''; } diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 5e0b6fac6f6..083d78c03e5 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -30,11 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; $action=GETPOST('action','aZ09'); $cancel=GETPOST('cancel','alpha'); -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("users"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("companies","products","admin","users","other")); // Security check if (! $user->admin) accessforbidden(); @@ -167,8 +164,6 @@ if ($action == 'edit') clearstatcache(); // Gestionnaires de menu - $var=true; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only @@ -405,14 +399,10 @@ else print $langs->trans("EMailsDesc")."
\n"; print "
\n"; - - $var=true; - print ''; print ''; // Method - print ''; @@ -433,7 +422,6 @@ else } // Port - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) { print ''; @@ -444,21 +432,18 @@ else } // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { print ''; } // TLS - print ''; // STARTTLS - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; $text=$listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING]; if (empty($text)) $text=$langs->trans("Undefined").img_warning(); @@ -422,7 +412,6 @@ else if (! empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') { // Host server - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) { print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID_EMAILING.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./','*',$conf->global->MAIN_MAIL_SMTPS_PW_EMAILING).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { @@ -472,7 +457,6 @@ else print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 69d1d8a8cea..b6268e7fc1e 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -1,5 +1,6 @@ + * Copyright (C) 2018 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 @@ -21,21 +22,6 @@ * \brief Page to adminsiter email sender profiles */ -//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('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check anti CSRF attack test -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check anti CSRF attack test -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test done when option MAIN_SECURITY_CSRF_WITH_TOKEN is on. -//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'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) - - require '../main.inc.php'; require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -43,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("errors","admin","mails","languages")); $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... @@ -244,6 +230,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -387,7 +378,7 @@ foreach($object->fields as $key => $val) include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters=array('arrayfields'=>$arrayfields); +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 77f969181f4..af7d29c0fd6 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2017 Philippe Grand + * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("errors","admin","mails","languages")); $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; @@ -55,8 +55,7 @@ $search_lang=GETPOST('search_lang','alpha'); $search_fk_user=GETPOST('search_fk_user','intcomma'); $search_topic=GETPOST('search_topic','alpha'); -$allowed=1; -if (! $allowed) accessforbidden(); +if (! empty($user->socid)) accessforbidden(); $acts[0] = "activate"; $acts[1] = "disable"; @@ -91,17 +90,17 @@ $tabsqlsort[25]="label ASC, lang ASC, position ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield=array(); -$tabfield[25]= "label,type_template,lang,fk_user,private,position,topic,joinfiles,content"; +$tabfield[25]= "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfield[25].=',content_lines'; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue=array(); -$tabfieldvalue[25]= "label,type_template,fk_user,lang,private,position,topic,joinfiles,content"; +$tabfieldvalue[25]= "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfieldvalue[25].=',content_lines'; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); -$tabfieldinsert[25]= "label,type_template,fk_user,lang,private,position,topic,joinfiles,content"; +$tabfieldinsert[25]= "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfieldinsert[25].=',content_lines'; $tabfieldinsert[25].=',entity'; // Must be at end because not into other arrays @@ -168,10 +167,8 @@ if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$la if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty'); if ($conf->adherent->enabled) $elementList['member']=$langs->trans('MailToMember'); if ($conf->contrat->enabled) $elementList['contract']=$langs->trans('MailToSendContract'); +if ($conf->projet->enabled) $elementList['project']=$langs->trans('MailToProject'); $elementList['user']=$langs->trans('MailToUser'); -$elementList['all'] =$langs->trans('VisibleEverywhere'); -$elementList['none']=$langs->trans('VisibleNowhere'); - $parameters=array('elementList'=>$elementList); $reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks @@ -181,6 +178,12 @@ if ($reshook == 0) { } } +// Add all and none after the sort +$elementList['all'] ='-- '.$langs->trans("All").' -- ('.$langs->trans('VisibleEverywhere').')'; +$elementList['none']='-- '.$langs->trans("None").' -- ('.$langs->trans('VisibleNowhere').')'; + +asort($elementList); + $id = 25; @@ -210,7 +213,7 @@ if (empty($reshook)) } // Actions add or modify an entry into a dictionary - if (GETPOST('actionadd') || GETPOST('actionmodify')) + if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) { $listfield=explode(',', str_replace(' ', '',$tabfield[$id])); $listfieldinsert=explode(',',$tabfieldinsert[$id]); @@ -226,15 +229,14 @@ if (empty($reshook)) if ($value == 'content') continue; if ($value == 'content_lines') continue; - if (GETPOST('actionmodify') && $value == 'topic') $_POST['topic']=$_POST['topic-'.$rowid]; + if (GETPOST('actionmodify','alpha') && $value == 'topic') $_POST['topic']=$_POST['topic-'.$rowid]; if ((! isset($_POST[$value]) || $_POST[$value]=='' || $_POST[$value]=='-1') && $value != 'lang' && $value != 'fk_user' && $value != 'position') { $ok=0; $fieldnamekey=$listfield[$f]; // We take translate key of field - if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label'; - if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments'; + if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Code'; if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; if ($fieldnamekey == 'note') $fieldnamekey = 'Note'; if ($fieldnamekey == 'type_template') $fieldnamekey = 'TypeOfTemplate'; @@ -269,8 +271,8 @@ if (empty($reshook)) if ($value == 'fk_user' && ! ($_POST[$keycode] > 0)) $_POST[$keycode]=''; if ($value == 'private' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='0'; if ($value == 'position' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='1'; - if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work - elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="null"; + if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="''"; // lang must be '' if not defined so the unique key that include lang will work else $sql.="'".$db->escape($_POST[$keycode])."'"; $i++; } @@ -316,12 +318,16 @@ if (empty($reshook)) if ($field == 'entity') $_POST[$keycode] = $conf->entity; if ($i) $sql.=","; $sql.= $field."="; - if ($_POST[$keycode] == '' || ($keycode == 'langcode' && empty($_POST[$keycode]))) $sql.="null"; // For vat, we want/accept code = '' + +// print $keycode.' - '.$_POST[$keycode].'
'; + if ($_POST[$keycode] == '' || ($keycode != 'langcode' && $keycode != 'private' && empty($_POST[$keycode]))) $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="''"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($keycode == 'private') $sql.=((int) $_POST[$keycode]); // private must be 0 or 1 else $sql.="'".$db->escape($_POST[$keycode])."'"; $i++; } $sql.= " WHERE ".$rowidcol." = '".$rowid."'"; - +//print $sql;exit; dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); @@ -431,24 +437,9 @@ if ($search_type_template != '' && $search_type_template != '-1') $sql.=natural_ if ($search_lang) $sql.=natural_search('lang', $search_lang); if ($search_fk_user != '' && $search_fk_user != '-1') $sql.=natural_search('fk_user', $search_fk_user, 2); if ($search_topic) $sql.=natural_search('topic', $search_topic); -if ($sortfield) -{ - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield='country_code'; - $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]; +// If sort order is "country", we use country_code instead +if ($sortfield == 'country') $sortfield='country_code'; +$sql.=$db->order($sortfield,$sortorder); $sql.=$db->plimit($listlimit+1,$offset); //print $sql; @@ -456,7 +447,6 @@ $fieldlist=explode(',',$tabfield[$id]); // Form to add a new line $alabelisused=0; -$var=false; print ''; print ''; @@ -478,7 +468,7 @@ foreach ($fieldlist as $field => $value) if ($fieldlist[$field]=='lang') { $valuetoshow=(empty($conf->global->MAIN_MULTILANGS) ? ' ' : $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 ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Code"); } if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } if ($fieldlist[$field]=='private') { $align='center'; } if ($fieldlist[$field]=='position') { $align='center'; } @@ -522,7 +512,7 @@ $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 +$reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; @@ -600,9 +590,7 @@ $colspan=count($fieldlist)+1; print '
'; print ''; - print ''; - print '
'; @@ -620,7 +608,6 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - $var=true; $param = '&id='.$id; $paramwithsearch = $param; @@ -646,7 +633,7 @@ if ($resql) elseif ($value == 'lang') { print '
'; - print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1); + print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth150'); print ''.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100onsmartphone').''.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200 maxwidth100onsmartphone').'
'; + print ''; if ($canbemodified) print ''.img_edit().''; if ($iserasable) { @@ -876,7 +877,6 @@ if ($resql) } print '
'; print ''; print ''; // Menu top - print ''; print ''; // Menu smartphone - print ''; print '"; print ''; - // Hide any PDF informations - - print ''; - //Desc print ''; print ''; - $var = true; if ($num > 0) { $i = 0; @@ -349,7 +344,12 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1,'customer',16); print ''; - print ''; + if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { + print ''; + } + else { + print ''; + } $i++; $total += $obj->total_ttc; } @@ -406,7 +406,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande print ''; print ''; - $var = true; if ($num > 0) { $i = 0; @@ -432,7 +431,12 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1,'supplier',16); print ''; - print ''; + if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { + print ''; + } + else { + print ''; + } $i++; $total += $obj->total_ttc; } @@ -518,7 +522,6 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''; $i++; - } $db->free($resql); @@ -744,7 +747,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''."\n"; - print ''; + if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { + print ''; + } + else { + print ''; + } print ''."\n"; print ''."\n"; $i++; @@ -843,7 +851,12 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; print ''."\n"; - print ''; + if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { + print ''; + } + else { + print ''; + } print ''."\n"; print ''."\n"; $i++; diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index cfafdaa725b..8d1a98a2745 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/modules/mailings/advthirdparties.modules require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; -// Translations -$langs->load("mails"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('mails', 'companies')); if (! empty($conf->categorie->enabled)) { $langs->load("categories"); } @@ -237,6 +236,7 @@ if ($action == 'add') { if (! empty($template_id)) { $query_temlate_id = '&template_id=' . $template_id; } + setEventMessages($langs->trans("XTargetsAdded",$result), null, 'mesgs'); header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id . $query_temlate_id); exit(); } @@ -975,4 +975,4 @@ if ($object->fetch($id) >= 0) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index a8bbb05fb84..97746ad9d82 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +// Load translation files required by the page $langs->load("mails"); if (! $user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->societe_id > 0)) accessforbidden(); @@ -244,7 +245,7 @@ if (empty($reshook)) $substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__']=dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . 'contractline' . $obj->source_id, 2); } } - /* For backward compatibility */ + /* For backward compatibility, deprecated */ if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN)) { $substitutionarray['__SECUREKEYPAYPAL__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); @@ -754,7 +755,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } @@ -1235,7 +1236,7 @@ else $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 48949881659..ef3fa3d81a9 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +// Load translation files required by the page $langs->load("mails"); // Security check @@ -425,7 +426,13 @@ if ($object->fetch($id) >= 0) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } + //$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets $sql .= $db->plimit($limit+1, $offset); @@ -555,7 +562,7 @@ if ($object->fetch($id) >= 0) include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $objectstatic=new Adherent($db); $objectstatic->fetch($obj->source_id); - print $objectstatic->getNomUrl(2); + print $objectstatic->getNomUrl(1); } else if ($obj->source_type == 'user') { @@ -563,14 +570,21 @@ if ($object->fetch($id) >= 0) $objectstatic=new User($db); $objectstatic->fetch($obj->source_id); $objectstatic->id=$obj->source_id; - print $objectstatic->getNomUrl(2); + print $objectstatic->getNomUrl(1); } else if ($obj->source_type == 'thirdparty') { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $objectstatic=new Societe($db); $objectstatic->fetch($obj->source_id); - print $objectstatic->getNomUrl(2); + print $objectstatic->getNomUrl(1); + } + else if ($obj->source_type == 'contact') + { + include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + $objectstatic=new Contact($db); + $objectstatic->fetch($obj->source_id); + print $objectstatic->getNomUrl(1); } else { diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 52eacf6c115..17693a1a73c 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -27,8 +27,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT .'/comm/mailing/class/mailing.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("commercial"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array('commercial', 'orders')); // Security check @@ -52,7 +52,6 @@ print '
'; //if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo //{ // Recherche emails - $var=false; print ''; print ''; print '
'.$langs->trans("Menu").''; @@ -180,7 +175,6 @@ if ($action == 'edit') print '
'.$langs->trans("DefaultMenuManager").''; $formadmin->select_menu(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED, 'MAIN_MENU_STANDARD', $dirstandard, empty($conf->global->MAIN_MENU_STANDARD_FORCED)?'':' disabled'); @@ -191,7 +185,6 @@ if ($action == 'edit') print '
'.$langs->trans("DefaultMenuSmartphoneManager").''; $formadmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled'); @@ -206,8 +199,6 @@ if ($action == 'edit') else { // Gestionnaires de menu - $var=true; - print ''; print ''; print ''; } - - print load_fiche_titre($langs->trans("PDFLocaltax",$locales),'',''); - - print '
'.$langs->trans("Menu").''; @@ -271,7 +262,6 @@ if ($action == 'edit') print ''; - if ($action != 'edit') { print '
'; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index dd90774a05b..cf4596ccda2 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -17,29 +17,19 @@ */ /** - * \file htdocs/admin/modules.php + * \file htdocs/admin/modulehelp.php * \brief Page to activate/disable all modules */ -//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) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("errors"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('errors', 'admin')); $mode=GETPOST('mode', 'alpha'); $action=GETPOST('action','alpha'); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index db8251d0562..588bdb856db 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php'; +// Load translation files required by the page $langs->loadLangs(array("errors","admin","modulebuilder")); $mode=GETPOST('mode', 'alpha'); @@ -78,10 +79,13 @@ $familyinfo=array( ); $param=''; -if ($search_keyword) $param.='&search_keyword='.urlencode($search_keyword); -if ($search_status > -1) $param.='&search_status='.urlencode($search_status); -if ($search_nature > -1) $param.='&search_nature='.urlencode($search_nature); -if ($search_version > -1) $param.='&search_version='.urlencode($search_version); +if (! GETPOST('buttonreset','alpha')) +{ + if ($search_keyword) $param.='&search_keyword='.urlencode($search_keyword); + if ($search_status && $search_status != '-1') $param.='&search_status='.urlencode($search_status); + if ($search_nature && $search_nature != '-1') $param.='&search_nature='.urlencode($search_nature); + if ($search_version && $search_version != '-1') $param.='&search_version='.urlencode($search_version); +} $dirins=DOL_DOCUMENT_ROOT.'/custom'; $urldolibarrmodules='https://www.dolistore.com/'; @@ -462,7 +466,7 @@ if ($mode == 'common') { dol_set_focus('#search_keyword'); - print '
'; + print ''; if ($optioncss != '') print ''; print ''; print ''; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 25feceda0d1..d4a031a6148 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; -// Translations -$langs->load("admin"); -$langs->load("multicurrency"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'multicurrency')); // Access control if (! $user->admin) { @@ -48,10 +47,11 @@ $action = GETPOST('action', 'alpha'); */ -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; - if (dolibarr_set_const($db, $code, GETPOST($code), 'chaine', 0, '', $conf->entity) > 0) + $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); + if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -62,7 +62,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -if (preg_match('/del_(.*)/',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, 0) > 0) @@ -142,17 +142,7 @@ elseif ($action == 'update_currency') } elseif ($action == 'synchronize') { - $response = GETPOST('response'); - $response = json_decode($response); - - if ($response->success) - { - MultiCurrency::syncRates($response); - } - else - { - setEventMessages($langs->trans('multicurrency_syncronize_error', $response->error->info), null, 'errors'); - } + MultiCurrency::syncRates($conf->global->MULTICURRENCY_APP_ID); } diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 5f57ac99efc..43782816202 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -29,13 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php'; -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); -$langs->load("propal"); -$langs->load("bills"); -$langs->load("errors"); -$langs->load("mails"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails')); // Security check if (!$user->admin) @@ -128,8 +123,6 @@ print ''; print ''; print ''; -$var=true; - print ''; print ''; print ''; @@ -168,7 +161,6 @@ $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); print ''; print '\n"; $notificationtrigger=new InterfaceNotification($db); $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); -$var=true; foreach($listofnotifiedevents as $notifiedevent) { diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 3e6f165161c..f03af4655d4 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2018 Frederic France * Copyright (C) 2016 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -33,9 +33,8 @@ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($ $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"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'oauth')); // Security check if (!$user->admin) @@ -95,6 +94,7 @@ print '
'.$langs->trans("Parameter").'
'; -$var=true; $i=0; foreach($listofnotifiedevents as $notifiedevent) { @@ -212,7 +204,6 @@ print "
'; $i=0; +// $list is defined into oauth.lib.php foreach ($list as $key) { $supported=0; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 15e70897fb6..4406dbd9576 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014-2015 Frederic France + * Copyright (C) 2014-2018 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 @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; use OAuth\Common\Storage\DoliStorage; -$langs->load("admin"); -$langs->load("printing"); -$langs->load("oauth"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'printing', 'oauth')); if (! $user->admin) accessforbidden(); @@ -141,13 +140,27 @@ if ($mode == 'setup' && $user->admin) $urltodelete=$urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms='https://github.com/settings/applications/'; } - if ($key[0] == 'OAUTH_GOOGLE_NAME') + elseif ($key[0] == 'OAUTH_GOOGLE_NAME') { $OAUTH_SERVICENAME='Google'; $urltorenew=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?state=userinfo_email,userinfo_profile,cloud_print&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms='https://security.google.com/settings/security/permissions'; } + elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') + { + $OAUTH_SERVICENAME='StripeTest'; + $urltorenew=$urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete=''; + $urltocheckperms=''; + } + else + { + $urltorenew=''; + $urltodelete=''; + $urltocheckperms=''; + } + // Show value of token $tokenobj=null; @@ -204,7 +217,6 @@ if ($mode == 'setup' && $user->admin) print '
'."\n"; - $var=false; print ''; print ''; print ''; @@ -222,7 +234,6 @@ if ($mode == 'setup' && $user->admin) print ''; print ''."\n"; - $var = ! $var; print ''; print ''; //var_dump($key); @@ -237,19 +248,21 @@ if ($mode == 'setup' && $user->admin) if (is_object($tokenobj)) { //test on $storage->hasAccessToken($OAUTH_SERVICENAME) ? - print ''.$langs->trans('DeleteAccess').'

'; + print ''.$langs->trans('DeleteAccess').'
'; } // Request remote token - print ''.$langs->trans('RequestAccess').'

'; + if ($urltorenew) + { + print ''.$langs->trans('RequestAccess').'
'; + } // Check remote access if ($urltocheckperms) { - print $langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; + print '
'.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; } print ''; print '
'; - $var = ! $var; print ''; print ''; //var_dump($key); @@ -272,7 +285,6 @@ if ($mode == 'setup' && $user->admin) if (is_object($tokenobj)) { // Token refresh - $var = ! $var; print ''; print ''; //var_dump($key); @@ -283,7 +295,6 @@ if ($mode == 'setup' && $user->admin) print ''; // Token expired - $var = ! $var; print ''; print ''; //var_dump($key); @@ -294,7 +305,6 @@ if ($mode == 'setup' && $user->admin) print ''; // Token expired at - $var = ! $var; print ''; print ''; //var_dump($key); @@ -354,7 +364,6 @@ if ($mode == 'userconf' && $user->admin) print $langs->trans('PrintUserConfDesc'.$driver)."

\n"; print '
'.$langs->trans($key[0]).'
'; - $var=true; print ''; print ''; print ''; diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 0019f7ae8c3..361fc5b67bb 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'orders')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 37c83f5dfe0..fc6322fac64 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadlangs(array('admin', 'other', 'orders')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index fdf0e9f9bee..1864fdb557c 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -26,10 +26,8 @@ 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'); +// Load translation files required by the page +$langs->loadLangs(array("admin", "other", "errors", "bills")); if (! $user->admin) accessforbidden(); @@ -131,8 +129,6 @@ foreach ($dirmodels as $reldir) $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')) @@ -249,7 +245,6 @@ print ''; print "\n"; // Allow payments on different thirdparties bills but same parent company -$var=! $var; print '\n"; -// Add js auto fill amount on paiement form -/* always on now -$var=! $var; -print '\n"; -*/ - print '
'.$langs->trans("User").''.$langs->trans("PrintModule").' 
'; print $langs->trans("PaymentOnDifferentThirdBills"); print ''; @@ -257,17 +252,6 @@ print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$con print ''; print "
'; -print $langs->trans("JSOnPaimentBill"); -print ''; -print $form->selectyesno("INVOICE_AUTO_FILLJS",$conf->global->INVOICE_AUTO_FILLJS,1); -print ''; -print "
'; print '
'; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 2f1ae179948..f988b27c5e6 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -31,9 +31,8 @@ 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/lib/pdf.lib.php'; -$langs->load("admin"); -$langs->load("languages"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other')); $langs->load("companies"); $langs->load("products"); @@ -133,7 +132,7 @@ if ($action == 'edit') // Edit // Misc options - print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
'; + print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'',''); print '
'; print ''; @@ -168,7 +167,7 @@ if ($action == 'edit') // Edit // Addresses - print load_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; + print load_fiche_titre($langs->trans("PDFAddressForging"),'',''); print '
'; print '
'; @@ -255,14 +254,15 @@ if ($action == 'edit') // Edit print '
'; print '
'; + print '
'; + // Localtaxes + $locales =''; + $text=''; if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) { - $locales =''; - $text=''; - if ($mysoc->useLocalTax(1)) { $locales = $langs->transcountry("LT1",$mysoc->country_code); @@ -279,31 +279,39 @@ if ($action == 'edit') // Edit $text.= $form->selectyesno('MAIN_PDF_MAIN_HIDE_THIRD_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX : 0, 1); $text.= '
'; - print ''; - print $text; - - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; - print '
'; - } + $title = $langs->trans("PDFRulesForSalesTax"); + if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) + { + $title.=' - '.$langs->trans("PDFLocaltax",$locales); + } + + print load_fiche_titre($title,'',''); + + print ''; + print ''; + + // Hide any information on Sale tax / VAT + + print ''; + + // Locataxes + print $text; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; + 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 '
'; + print '
'; + + // Other - print load_fiche_titre($langs->trans("Other"),'','').'
'; + print load_fiche_titre($langs->trans("Other"),'',''); print '
'; print ''; print ''; - // Hide any PDF informations - - print ''; - //Desc print ''; } - print load_fiche_titre($langs->trans("PDFLocaltax",$locales),'',''); - - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; - 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 '
'.$langs->trans("HideDescOnPDF").''; @@ -491,11 +499,10 @@ else // Show print '
'; // Localtaxes + $locales =''; + $text=''; if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) { - $locales =''; - $text=''; - if ($mysoc->useLocalTax(1)) { $locales = $langs->transcountry("LT1",$mysoc->country_code); @@ -513,16 +520,27 @@ else // Show $text.= '
'; - print ''; - print $text; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; - print '
'; - } + // Sales TAX / VAT information + $title=$langs->trans("PDFRulesForSalesTax",$locales); + if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) $title.=' - '.$langs->trans("PDFLocaltax",$locales); + + print load_fiche_titre($title,'',''); + + print ''; + print ''; + + print ''; + + print $text; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; + print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); + print '
'; + print '
'; + + // Other print load_fiche_titre($langs->trans("Other"),'',''); @@ -558,12 +576,6 @@ else // Show print "
'.$langs->trans("HideAnyVATInformationOnPDF").''; - print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); - print '
'.$langs->trans("HideDescOnPDF").''; @@ -601,7 +613,7 @@ else // Show */ print '
'; - print load_fiche_titre($langs->trans("Library")); + print load_fiche_titre($langs->trans("Library"), '', ''); print '
'; print ''."\n"; @@ -644,7 +656,6 @@ else // Show print ' ('.@constant('TCPDI_PATH').')'; $i++; } - print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index d3880586f41..50bf939c07f 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -28,9 +28,8 @@ 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("admin"); -$langs->load("users"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'users', 'other')); $action=GETPOST('action','aZ09'); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 602b80c3855..6fd40cf2825 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("admin"); -$langs->load("withdrawals"); +// Load translation files required by the page +$langs->loadLangs(array("admin","withdrawals")); // Security check if (!$user->admin) accessforbidden(); @@ -274,7 +274,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -417,7 +416,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) if ($resql) { $num = $db->num_rows($resql); - $var = true; $i = 0; while ($i < $num) { diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index c533ea94795..94b1d1dac67 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -33,10 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load('other'); -$langs->load('propal'); + +// Load translation files required by the page +$langs->loadLangs(array("admin", "other", "errors", "propal")); if (! $user->admin) accessforbidden(); @@ -266,8 +265,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; - while (($file = readdir($handle))!==false) { if (substr($file, 0, 12) == 'mod_propale_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -386,7 +383,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -531,7 +527,6 @@ print ''; print ''; /* -$var=! $var; print ''; print ''; print ''; @@ -631,7 +626,7 @@ print "\n"; print " \n"; print " \n"; print "\n"; -print "\n \n \n\n"; +print "\n \n \n\n"; print "
".$langs->trans("Name")."".$langs->trans("Value")."
".$langs->trans("PathDirectory")."".$conf->propal->multidir_output[$conf->entity]."
".$langs->trans("PathDirectory")."".$conf->propal->multidir_output[$conf->entity]."
\n
"; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index ee22f377200..87a89f5d99b 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -26,10 +26,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); - +// Load translation files required by the page +$langs->loadLangs(array("other", "users", "admin")); if (!$user->admin) accessforbidden(); @@ -124,7 +122,6 @@ if ($conf->use_javascript_ajax) // Timeout -$var=true; print ''; @@ -163,7 +160,7 @@ print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (empty($reshook) && ! empty($extrafields->attribute_label)) +if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 149eb160a78..e57e51caf62 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +// Load translation files required by the page $langs->load("categories"); if (! $user->rights->categorie->lire) accessforbidden(); @@ -82,7 +83,7 @@ print '
'.$langs->trans("MAIN_PROXY_HOST").''; print ''; @@ -172,7 +169,7 @@ print '
'.$langs->trans("MAIN_PROXY_PORT").''; print ''; @@ -181,7 +178,7 @@ print '
'.$langs->trans("MAIN_PROXY_USER").''; print ''; @@ -190,7 +187,7 @@ print '
'.$langs->trans("MAIN_PROXY_PASS").''; print ''; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 0de8987e277..4465017bdc6 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -30,8 +30,8 @@ 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"); +// Load translation files required by the page +$langs->loadLangs(array("admin","receiptprinter")); if (! $user->admin) accessforbidden(); @@ -232,7 +232,6 @@ if ($mode == 'config' && $user->admin) print $langs->trans("ReceiptPrinterDesc")."

\n"; print ''."\n"; - $var=true; print ''; print ''; print ''; @@ -248,10 +247,11 @@ if ($mode == 'config' && $user->admin) if ($ret > 0) { setEventMessages($printer->error, $printer->errors, 'errors'); } else { - for ($line=0; $line < $nbofprinters; $line++) { - $var = !$var; + for ($line=0; $line < $nbofprinters; $line++) + { print ''; - if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) { + if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) + { print ''; print ''; $ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']); @@ -329,11 +329,11 @@ if ($mode == 'config' && $user->admin) print $langs->trans("ReceiptPrinterTypeDesc")."

\n"; print '
'.$langs->trans("Name").''.$langs->trans("Type").'
'."\n"; - print ''; - print ''; - print ''; - print ''; - //print ''; + 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").'
'.$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(); @@ -342,11 +342,11 @@ if ($mode == 'config' && $user->admin) dol_fiche_head(); print $langs->trans("ReceiptPrinterProfileDesc")."

\n"; print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; + 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").'
'.$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(); } @@ -365,7 +365,6 @@ if ($mode == 'template' && $user->admin) print $langs->trans("ReceiptPrinterTemplateDesc")."

\n"; print ''."\n"; - $var=true; print ''; print ''; print ''; @@ -379,8 +378,8 @@ if ($mode == 'template' && $user->admin) setEventMessages($printer->error, $printer->errors, 'errors'); } else { $max = count($printer->listprinterstemplates); - for ($line=0; $line < $max; $line++) { - $var = !$var; + for ($line=0; $line < $max; $line++) + { print ''; if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { print ''; @@ -419,14 +418,13 @@ if ($mode == 'template' && $user->admin) print ''; print '

'; print '
'.$langs->trans("Name").''.$langs->trans("Template").'
'."\n"; - $var=true; print ''; print ''; print ''; print "\n"; $max = count($printer->tags); - for ($tag=0; $tag < $max; $tag++) { - $var = !$var; + for ($tag=0; $tag < $max; $tag++) + { print ''; print ''; print ''; diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 6560d194ca7..e8f8bdba204 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -30,8 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; if (! empty($conf->resouce->enabled)) require_once DOL_DOCUMENT_ROOT . '/resource/class/html.formresource.class.php'; -$langs->load("admin"); -$langs->load("resource"); +// Load translation files required by the page +$langs->loadLangs(array("admin","resource")); // Security check if (!$user->admin) @@ -76,7 +76,6 @@ print ''; print ''; print ''; -$var=true; print '
'.$langs->trans("Tag").''.$langs->trans("Description").'
<'.$printer->tags[$tag].'>'.$langs->trans(strtoupper($printer->tags[$tag])).'
'; print ''; print ''."\n"; @@ -85,7 +84,6 @@ print ''; // Utilisation formulaire Ajax sur choix produit - print ''; print ''; if (empty($conf->use_javascript_ajax)) diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index e77ebc19902..8193d146aaa 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -33,9 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("resource"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'resource')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 7d3c0eaad77..6c5281173c3 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -28,8 +28,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; -$langs->load("admin"); -$langs->load("salaries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'salaries')); // Security check if (!$user->admin) diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 9627164f534..129853837a4 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $action=GETPOST('action','aZ09'); -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("users","admin","other")); if (!$user->admin) accessforbidden(); @@ -127,7 +126,7 @@ if ($action == 'activate_encryptdbpassconf') if ($result > 0) { sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. - + // database value not required //dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); header("Location: security.php"); @@ -135,7 +134,7 @@ if ($action == 'activate_encryptdbpassconf') } else { - setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); + setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } } else if ($action == 'disable_encryptdbpassconf') @@ -144,7 +143,7 @@ else if ($action == 'disable_encryptdbpassconf') if ($result > 0) { sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. - + // database value not required //dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); header("Location: security.php"); @@ -178,10 +177,6 @@ if ($action == 'maj_pattern') - - - - /* * View */ @@ -201,9 +196,6 @@ $head=security_prepare_head(); dol_fiche_head($head, 'passwords', $langs->trans("Security"), -1); -$var=false; - - // Choix du gestionnaire du generateur de mot de passe print ''; print ''; @@ -233,6 +225,7 @@ if (is_resource($handle)) } closedir($handle); } +asort($arrayhandler); print '
'.$langs->trans("Parameters").'
'.$langs->trans("UseSearchToSelectResource").'
'; print ''; @@ -249,7 +242,6 @@ foreach ($arrayhandler as $key => $module) if ($module->isEnabled()) { - $var = !$var; 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 ucfirst($key); print "\n"; @@ -299,42 +291,42 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ print ' '.$langs->trans("PasswordPatternDesc").'
' . $langs->trans("MinLength")."
' . $langs->trans("NbMajMin")."
' . $langs->trans("NbNumMin")."
' . $langs->trans("NbSpeMin")."
' . $langs->trans("NbIteConsecutive")."
' . $langs->trans("NoAmbiCaracAutoGeneration")." '.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'
'; print '
'; @@ -394,7 +386,6 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ // Cryptage mot de passe print '
'; -$var=true; print ""; print ''; print ""; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 1053658b191..4a4637185ca 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('users', 'admin', 'other')); if (! $user->admin) accessforbidden(); @@ -51,41 +50,17 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) dol_add_file_process($upload_dir, 0, 0, 'userfile'); } -if (preg_match('/set_(.*)/',$action,$reg)) +if ($action == 'updateform') { - $code=$reg[1]; - $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); - if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) - { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} + $antivircommand = GETPOST('MAIN_ANTIVIRUS_COMMAND','none'); // Use GETPOST none because we must accept ". Example c:\Progra~1\ClamWin\bin\clamscan.exe + $antivirparam = GETPOST('MAIN_ANTIVIRUS_PARAM','none'); // Use GETPOST none because we must accept ". Example --database="C:\Program Files (x86)\ClamWin\lib" + $antivircommand = dol_string_nospecial($antivircommand, '', array("|", ";", "<", ">", "&")); // Sanitize command + $antivirparam = dol_string_nospecial($antivirparam, '', array("|", ";", "<", ">", "&")); // Sanitize params -else if (preg_match('/del_(.*)/',$action,$reg)) -{ - $code=$reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} - -else if ($action == 'updateform') -{ $res3=dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',GETPOST('MAIN_UPLOAD_DOC','alpha'),'chaine',0,'',$conf->entity); $res4=dolibarr_set_const($db, "MAIN_UMASK", GETPOST('MAIN_UMASK','alpha'),'chaine',0,'',$conf->entity); - $res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", trim(GETPOST('MAIN_ANTIVIRUS_COMMAND','none')),'chaine',0,'',$conf->entity); // Use GETPOST none because we must accept " - $res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", trim(GETPOST('MAIN_ANTIVIRUS_PARAM','none')),'chaine',0,'',$conf->entity); // Use GETPOST none because we must accept " + $res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", trim($antivircommand),'chaine',0,'',$conf->entity); + $res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", trim($antivirparam),'chaine',0,'',$conf->entity); if ($res3 && $res4 && $res5 && $res6) setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } @@ -95,10 +70,10 @@ else if ($action == 'updateform') 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). + $file = $conf->admin->dir_temp . '/' . GETPOST('urlfile','alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret=dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile','alpha')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile','alpha')), null, 'errors'); Header('Location: '.$_SERVER["PHP_SELF"]); exit; } diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index e5c66d9e24b..6503ab10f77 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("users","admin","other")); if (! $user->admin) accessforbidden(); @@ -43,10 +42,10 @@ $action=GETPOST('action','alpha'); * Actions */ -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; - $value=(GETPOST($code) ? GETPOST($code) : 1); + $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); @@ -58,7 +57,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -else if (preg_match('/del_(.*)/',$action,$reg)) +else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -107,8 +106,6 @@ dol_fiche_head($head, 'misc', $langs->trans("Security"), -1); // Other Options -$var=true; - print ''; print ''; print ''; @@ -116,7 +113,6 @@ print ''; print ''; // Enable Captcha code - print ''; print ''; print ''; // Enable advanced perms - print ''; print ''; print '\n"; print " \n"; print ''."\n"; - $var = !$var; + print ''; print ''; print '\n"; print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -403,7 +400,6 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var = !$var; print ''; print ''; print ''; print "\n"; -$var=true; print ''; print ''; + +if(! empty($conf->loghandlers['mod_syslog_file']) && ! empty($conf->cron->enabled)) { + print ''; + print ''; +} + print '
'.$langs->trans("Parameters").''.$langs->trans("Status").'
'.$langs->trans("UseCaptchaCode").''; @@ -146,7 +142,6 @@ else print '
'.$langs->trans("UseAdvancedPerms").''; @@ -174,8 +169,6 @@ print '
'; // Timeout -$var=true; - print ''; print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 0027f2e834d..db1cb20b5e3 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -25,12 +25,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("sms"); -$langs->load("other"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("companies","admin","products","sms","other","errors")); if (!$user->admin) accessforbidden(); @@ -169,30 +165,25 @@ if ($action == 'edit') print ''; clearstatcache(); - $var=true; print '
'.$langs->trans("Parameters").'
'; print ''; - // Disable - + // Disable print ''; - // Separator - + // Separator print ''; - // Method - + // Method print ''; - // From - + // From print ''; print ''; @@ -216,31 +207,26 @@ if ($action == 'edit') } else { - $var=true; if (! count($listofmethods)) print '
'.$langs->trans("NoSmsEngine",'DoliStore').'
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_SMS").''; print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print '
 
'.$langs->trans("MAIN_SMS_SENDMODE").''; if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); else print ''.$langs->trans("None").''; print '
'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'
'; print ''; - // Disable - + // Disable print ''; - // Separator - + // Separator print ''; - // Method - + // Method print ''; - // From - + // From print ''; print ''; print " \n"; print " \n"; print ''."\n"; -$var=true; $found=0; - print ''; print ''; print ''; print " \n"; print " \n"; print ''."\n"; -$var=true; $found=0; - print ''; print ''; print '\n"; print "\n"; // Option to force stock to be enough before adding a line into document -if($conf->invoice->enabled) { - $var = !$var; +if($conf->invoice->enabled) +{ print ''; print ''; print '\n"; } -if($conf->order->enabled) { - $var = !$var; +if($conf->order->enabled) +{ print ''; print ''; print '\n"; } -if($conf->expedition->enabled) { - $var = !$var; +if($conf->expedition->enabled) +{ print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_SMS").''.yn($conf->global->MAIN_DISABLE_ALL_SMS).'
 
'.$langs->trans("MAIN_SMS_SENDMODE").''; $text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE]; if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning(); print $text; print '
'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_SMS_FROM; if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 1452ea572d0..b9892fdf2a9 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("mailmanspip"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "members", "mailmanspip")); if (! $user->admin) accessforbidden(); @@ -118,8 +117,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup' $head = mailmanspip_admin_prepare_head(); -$var=true; - /* * Spip */ diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index e7c77f5955f..e1098ef262d 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -3,7 +3,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012-2013 Juanjo Menent - * Copyright (C) 2013-2017 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -28,8 +28,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load("admin"); -$langs->load("stocks"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "stocks")); // Securit check if (!$user->admin) accessforbidden(); @@ -162,11 +162,9 @@ print '
".$langs->trans("RuleForStockManagementDecrease")." 
'.$langs->trans("DeStockOnBill").''; @@ -266,11 +264,9 @@ print '
".$langs->trans("RuleForStockManagementIncrease")." 
'.$langs->trans("ReStockOnBill").''; @@ -362,8 +358,8 @@ print "
'.$langs->trans("StockMustBeEnoughForInvoice").''; @@ -377,8 +373,8 @@ if($conf->invoice->enabled) { print "
'.$langs->trans("StockMustBeEnoughForOrder").''; @@ -392,8 +388,8 @@ if($conf->order->enabled) { print "
'.$langs->trans("StockMustBeEnoughForShipment").''; @@ -408,7 +404,6 @@ if($conf->expedition->enabled) { } print '
'; - print '
'; $virtualdiffersfromphysical=0; @@ -423,7 +418,7 @@ if ($virtualdiffersfromphysical) print "
".$langs->trans("RuleForStockReplenishment")." ".img_help('help',$langs->trans("VirtualDiffersFromPhysical"))." 
'.$langs->trans("UseVirtualStockByDefault").''; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 1532ca0a89d..75a917dd185 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-2017 Philippe Grand + * Copyright (C) 2011-2018 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 @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "other", "orders")); if (!$user->admin) accessforbidden(); @@ -233,7 +232,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index b86b674e9ad..695d25a963c 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-2017 Philippe Grand + * Copyright (C) 2011-2018 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 @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "other", "orders")); if (!$user->admin) accessforbidden(); @@ -179,24 +178,30 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER') // TODO We add/delete permission here until permission can have a condition on a global var include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php'; $newmodule=new modFournisseur($db); - // clear default rights array - $newmodule->rights=array(); - // add new right - $r=0; - $newmodule->rights[$r][0] = 1190; - $newmodule->rights[$r][1] = $langs->trans("Permission1190"); - $newmodule->rights[$r][2] = 'w'; - $newmodule->rights[$r][3] = 0; - $newmodule->rights[$r][4] = 'commande'; - $newmodule->rights[$r][5] = 'approve2'; - + if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) { + // clear default rights array + $newmodule->rights=array(); + // add new right + $r=0; + $newmodule->rights[$r][0] = 1190; + $newmodule->rights[$r][1] = $langs->trans("Permission1190"); + $newmodule->rights[$r][2] = 'w'; + $newmodule->rights[$r][3] = 0; + $newmodule->rights[$r][4] = 'commande'; + $newmodule->rights[$r][5] = 'approve2'; + + // Insert $newmodule->insert_permissions(1); } else { + // Remove all rights with Permission1190 $newmodule->delete_permissions(); + + // Add all right without Permission1190 + $newmodule->insert_permissions(1); } } @@ -262,7 +267,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 86cd8d02207..c1f3a7cb25d 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -27,12 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load('other'); -$langs->load('bills'); -$langs->load('orders'); - +// Load translation files required by the page +$langs->loadLangs(array("admin", "errors", "other", "bills", "orders")); if (! $user->admin) accessforbidden(); @@ -217,7 +213,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { @@ -249,7 +244,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var = !$var; print '
'; echo preg_replace('/\-.*$/','',preg_replace('/mod_supplier_payment_/','',preg_replace('/\.php$/','',$file))); print "\n"; @@ -360,7 +354,6 @@ foreach ($dirmodels as $reldir) require_once $dir.'/'.$file; $module = new $classname($db, new PaiementFourn($db)); - print "
"; print (empty($module->name)?$name:$module->name); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 0c389f6b4c2..99069447e81 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -28,10 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.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'); + +// Load translation files required by the page +$langs->loadLangs(array("admin", "errors", "other", "supplier_proposal")); if (! $user->admin) accessforbidden(); @@ -247,7 +246,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { @@ -366,7 +364,6 @@ print "
'; print (empty($module->name)?$name:$module->name); print "\n"; @@ -492,7 +488,6 @@ print '
'; */ print load_fiche_titre($langs->trans("OtherOptions"),'',''); -$var=true; print ""; print ""; print "\n"; @@ -506,7 +501,6 @@ $htmltext = ''.$langs->trans("AvailableVariables").':
'; foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; $htmltext.='
'; -$var=! $var; print ''; print ''; print ''; @@ -585,7 +579,7 @@ print "\n"; print " \n"; print " \n"; print "\n"; -print "\n \n \n\n"; +print "\n \n \n\n"; print "
".$langs->trans("Parameter")."
".$langs->trans("Name")."".$langs->trans("Value")."
".$langs->trans("PathDirectory")."".$conf->supplier_proposal->dir_output."
".$langs->trans("PathDirectory")."".$conf->supplier_proposal->dir_output."
\n
"; llxFooter(); diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 8ed25fbd036..7e913772e2c 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -31,6 +31,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +// Load translation files required by the page $langs->load("orders"); if (!$user->admin) diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 8fd202076d1..d8156d54779 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -36,11 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("bills"); -$langs->load("orders"); -$langs->load("suppliers"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'bills', 'orders', 'suppliers')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index a95650c7524..30cf4d983e4 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); + // Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'orders')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index a6f2a75952a..85106bf84f0 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'orders')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index d850e7eeb11..45dc91a8b95 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -31,8 +31,8 @@ global $conf; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("admin","other")); $error=0; $action = GETPOST('action','aZ09'); @@ -50,7 +50,6 @@ foreach ($dirsyslogs as $reldir) { $handle = opendir($newdir); if (is_resource($handle)) { - $var = true; while (($file = readdir($handle)) !== false) { if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { @@ -146,6 +145,16 @@ if ($action == 'setlevel') dol_syslog("admin/syslog: level ".$level); if (! $res > 0) $error++; + + if (! $error) + { + $file_saves = GETPOST("file_saves"); + $res = dolibarr_set_const($db,"SYSLOG_FILE_SAVES",$file_saves,'chaine',0,'',0); + dol_syslog("admin/syslog: file saves ".$file_saves); + + if (! $res > 0) $error++; + } + if (! $error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -270,7 +279,6 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("SyslogLevel").''; print '
'.$langs->trans("SyslogFileNumberOfSaves").''; + print ' ('.$langs->trans('ConfigureCleaningCronjobToSetFrequencyOfSaves').')
'; print "\n"; diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index eee003b0872..82e8481c2dd 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -140,7 +140,7 @@ $configfilelib=array( 'Limit nb of email sent by page', 'Strict mode is on/off' ); -$var=true; + print ''; print ''; print ''; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index d6e05ed2e72..cef493c95f8 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -66,7 +66,6 @@ else if ($resql) { $num = $db->num_rows($resql); - $var=True; $i=0; while ($i < $num) { @@ -109,7 +108,7 @@ else //$sql = "DESCRIBE ".$table; $sql = "SHOW FULL COLUMNS IN ".$db->escape($table); - + $resql = $db->query($sql); if ($resql) { @@ -129,7 +128,7 @@ else print ""; - + print ''; print ''; $i++; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 468a2c493a7..c0a1c610fe6 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -220,7 +220,6 @@ print ''; if (is_array($resCached)) { - $var = ! $var; print ''; print ""; print ''; print ""; - $var = ! $var; + print ''; print ""; print ''; @@ -301,17 +291,16 @@ if (is_array($resCached) || is_array($resRemoved)) { } if (is_array($resRemoved)) { - $var = ! $var; print ''; print ""; print ''; print ""; - $var = ! $var; + print ''; print ""; print ''; print ""; - $var = ! $var; + print ''; print ""; print ''; diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 01ab314df73..f3d2057395f 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -41,7 +41,7 @@ $page = GETPOST("page",'int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if ($page < 0) { $page = 0; } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) accessforbidden(); @@ -280,7 +280,7 @@ function backup_tables($outputfile, $tables='*') //cycle through $handle = fopen($outputfile, 'w+'); - if (fwrite($handle, '') === FALSE) + if (fwrite($handle, '') === false) { $langs->load("errors"); dol_syslog("Failed to open file ".$outputfile,LOG_ERR); diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index ac520ce22b3..48d3ef57fd5 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -184,6 +184,11 @@ $nbtotalofrecords = ''; { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } }*/ $sql.= $db->plimit($conf->liste_limit+1, $offset); diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 76f7debf3e7..70b0987732b 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -137,12 +137,8 @@ if ($savehandler == 'files') print_liste_field_titre(''); print "\n"; - $var=True; - foreach ($listofsessions as $key => $sessionentry) { - - print ''; // Login diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 1999aab006c..55a407c3e61 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +// Load translation files required by the page $langs->loadLangs(array("companies","products","admin","sms","other","errors")); if (!$user->admin) accessforbidden(); @@ -266,7 +267,7 @@ if ($mode == 'overwrite') print '
'; print img_info().' '.$langs->trans("SomeTranslationAreUncomplete"); $urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation'; - print ' ('.$langs->trans("SeeAlso").': '.$langs->trans("Here").')
'; + print ' ('.$langs->trans("SeeAlso", ''.$langs->trans("Here").'').')
'; print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n"; print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."
\n"; print '
'; @@ -552,7 +553,9 @@ if ($mode == 'searchkey') if (! empty($conf->global->MAIN_FEATURES_LEVEL)) { $transifexlangfile='$'; // $ means 'All' - $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; + //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; + $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key; + print '   '.img_picto('FixOnTransifex', 'object_globe').''; } } diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 58ca4e0eded..1a1893e2eb0 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -23,6 +23,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) accessforbidden(); @@ -65,10 +66,8 @@ print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'act print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n"; print ''; -$var=True; foreach ($triggers as $trigger) { - print ''; print ''; print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index ee5faefeaee..f888c8410bb 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'members', 'users')); if (! $user->admin) accessforbidden(); $extrafields = new ExtraFields($db); @@ -86,7 +85,7 @@ elseif ($action == 'setdoc') } $res = true; } -elseif (preg_match('/set_(.*)/',$action,$reg)) +elseif (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) @@ -100,7 +99,7 @@ elseif (preg_match('/set_(.*)/',$action,$reg)) } } -elseif (preg_match('/del_(.*)/',$action,$reg)) +elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index 5a1cf94e59f..28f1ad6af2f 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -32,9 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "members", "users")); + if (! $user->admin) accessforbidden(); $extrafields = new ExtraFields($db); @@ -83,7 +83,7 @@ elseif ($action == 'setdoc') } $res = true; } -elseif (preg_match('/set_(.*)/',$action,$reg)) +elseif (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) @@ -97,7 +97,7 @@ elseif (preg_match('/set_(.*)/',$action,$reg)) } } -elseif (preg_match('/del_(.*)/',$action,$reg)) +elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -165,7 +165,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { foreach (array('','/doc') as $valdir) @@ -202,7 +201,6 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var = !$var; print ''; + + print '
'; + print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); + + $moreforfilter = ''; + + print '
'; + print '
'.$langs->trans("Label").''.$langs->trans("Parameter").'".(isset($link[$row[0]][0])?$link[$row[0]][0]:'')."."; print (isset($link[$row[0]][1])?$link[$row[0]][1]:'')."
  => price(1234.56)'.price(1234.56) $txt =$langs->trans("OSTZ").' (variable system TZ): '.(! empty($_ENV["TZ"])?$_ENV["TZ"]:$langs->trans("NotDefined")).'
'."\n"; $txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."
\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php $txt.=$langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ)?$langs->trans("NotDefined"):$conf->global->MAIN_SERVER_TZ); -//$txt.=$langs->trans("YouCanEditPHPTZ"); // deprecated print '
'.$langs->trans("CurrentTimeZone").''; // Timezone server PHP $a=getServerTimeZoneInt('now'); $b=getServerTimeZoneInt('winter'); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 38cf0b3f0df..3cef158c2ea 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -3,6 +3,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2015 Frederic France + * Copyright (C) 2017 Nicolas ZABOURI * * 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,6 +40,8 @@ $error=0; * View */ +@set_time_limit(300); + llxHeader(); print load_fiche_titre($langs->trans("FileCheckDolibarr"),'','title_setup'); @@ -72,7 +75,7 @@ print '
'; $file_list = array('missing' => array(), 'updated' => array()); // Local file to compare to -$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml'; +$xmlshortfile = GETPOST('xmlshortfile','alpha')?GETPOST('xmlshortfile','alpha'):'/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)?'':$conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; // Remote file to compare to $xmlremote = GETPOST('xmlremote'); @@ -83,8 +86,8 @@ if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signa // Test if remote test is ok -$enableremotecheck = True; -if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=False; +$enableremotecheck = true; +if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=false; $enableremotecheck = true; print '
'; diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 55584df6445..1e757b72f63 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -50,7 +50,7 @@ llxHeader(); 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").')
'; +print $langs->trans("YouMayFindPerfAdviceHere",'https://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').' ('.$langs->trans("Reload").')
'; // Recupere la version de PHP $phpversion=version_php(); diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 684577a6d6d..7c4bf64909f 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -29,19 +29,13 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; -$langs->load('admin'); -$langs->load('objects'); -$langs->load("companies"); -$langs->load("products"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'objects', 'companies', 'products')); if (!$user->admin) accessforbidden(); $action = GETPOST('action','alpha'); -// Other parameters -$list = array ( - 'ACCOUNTING_VAT_PAY_ACCOUNT' -); /* @@ -76,35 +70,38 @@ if ($action == 'update') { switch ($tax_mode) { case 0: - $value = 'payment'; + $valuesellproduct = 'invoice'; + $valuebuyproduct = 'invoice'; + $valuesellservice = 'payment'; + $valuebuyservice = 'payment'; break; case 1: - $value = 'invoice'; + $valuesellproduct = 'invoice'; + $valuebuyproduct = 'invoice'; + $valuesellservice = 'invoice'; + $valuebuyservice = 'invoice'; + break; + case 2: + $valuesellproduct = 'payment'; + $valuebuyproduct = 'payment'; + $valuesellservice = 'payment'; + $valuebuyservice = 'payment'; break; } - $res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', 'invoice','chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', $valuesellproduct,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', 'invoice','chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', $valuebuyproduct,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $value,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $valuesellservice, 'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $value,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $valuebuyservice, 'chaine',0,'',$conf->entity); if (! $res > 0) $error++; dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva",'alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_VAT_RETURN", GETPOST("MAIN_INFO_VAT_RETURN",'alpha'),'chaine',0,'',$conf->entity); - // Others options - foreach ($list as $constname) { - $constvalue = GETPOST($constname, 'alpha'); - - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - if (! $error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -141,7 +138,7 @@ else print ''; print ''; - print ''; + print ''; print '"; @@ -169,61 +167,85 @@ else print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; print ''; @@ -157,10 +154,11 @@ else else { print ''; - $listval=array('0'=>$langs->trans(""), - '1'=>$langs->trans("Monthly"), - '2'=>$langs->trans("Quarterly"), - '3'=>$langs->trans("Annual"), + $listval=array( + '0'=>$langs->trans(""), + '1'=>$langs->trans("Monthly"), + '2'=>$langs->trans("Quarterly"), + '3'=>$langs->trans("Annual"), ); print $form->selectarray("MAIN_INFO_VAT_RETURN", $listval, $conf->global->MAIN_INFO_VAT_RETURN); print "
'; - print "
\n"; + print '
'; print ''; // Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT print ''; - print ''; + print ''; print "\n"; - print ''; - print ''; + print '\n"; - print ''; - print '\n"; - + // On debit for services + print ''; + print '\n"; + // On payment for both products and services + if ($conf->global->MAIN_FEATURES_LEVEL >= 1) + { + print ''; + print '\n"; + } print "
'.$langs->trans('OptionVatMode').''.$langs->trans('Description').''.$langs->trans('OptionVatMode').''.$langs->trans('Description').'
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); + // Standard + print '
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); print "
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
'.$langs->trans('OptionPaymentForProductAndServices').''.nl2br($langs->trans('OptionPaymentForProductAndServicesDesc'))."
\n"; print '
'; - print load_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); + print load_fiche_titre('', '', '', 0, 0, '', '-> '.$langs->trans("SummaryOfVatExigibilityUsedByDefault")); //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; + print ''; - print ''; + print ''; // Products print ''; print ''; print ''; // Services print ''; print ''; print ''; print ''; print ''; @@ -194,8 +192,7 @@ function create_script_table($list) */ function create_key_table($list) { - global $bc,$langs; - $var=true; + global $langs; print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'.$langs->trans("Product").''; - print $langs->trans("OnDelivery"); - print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment') + { + print $langs->trans("OnPayment"); + print ' ('.$langs->trans("SupposedToBePaymentDate").')'; + } + else + { + print $langs->trans("OnDelivery"); + print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + } print ''; - print $langs->trans("OnDelivery"); - print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') + { + print $langs->trans("OnPayment"); + print ' ('.$langs->trans("SupposedToBePaymentDate").')'; + } + else + { + print $langs->trans("OnDelivery"); + print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + } print '
'.$langs->trans("Services").''; - if ($tax_mode == 0) + if ($conf->global->TAX_MODE_BUY_SERVICE == 'payment') { print $langs->trans("OnPayment"); print ' ('.$langs->trans("SupposedToBePaymentDate").')'; } - if ($tax_mode == 1) + else { print $langs->trans("OnInvoice"); print ' ('.$langs->trans("InvoiceDateUsed").')'; } print ''; - if ($tax_mode == 0) + if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') { print $langs->trans("OnPayment"); print ' ('.$langs->trans("SupposedToBePaymentDate").')'; } - if ($tax_mode == 1) + else { print $langs->trans("OnInvoice"); print ' ('.$langs->trans("InvoiceDateUsed").')'; @@ -235,40 +257,6 @@ else print "
\n"; -/* - * Others params - */ -print ''; -print ''; -print ''; -print "\n"; - -foreach ($list as $key) -{ - print ''; - - // Param - $label = $langs->trans($key); - print ''; - - // Value - print ''; -} - -print '
' . $langs->trans('OtherOptions') . '
'; - if (! empty($conf->accounting->enabled)) - { - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); - } - else - { - print ''; - } - print '
'; - - -//dol_fiche_end(); - print '
'; print ''; @@ -276,5 +264,15 @@ print '
'; print ''; + + + +if (! empty($conf->accounting->enabled)) +{ + $langs->load("accountancy"); + print '

'.$langs->trans("AccountingAccountForSalesTaxAreDefinedInto", $langs->transnoentitiesnoconv("MenuAccountancy"), $langs->transnoentitiesnoconv("Setup")).''; +} + + llxFooter(); $db->close(); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php new file mode 100644 index 00000000000..c6f5e49ff01 --- /dev/null +++ b/htdocs/admin/ticket.php @@ -0,0 +1,643 @@ + + * Copyright (C) 2016 Christophe Battarel + * + * 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/ticket.php + * \ingroup ticket + * \brief This file is a module setup page + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; +require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; +require_once DOL_DOCUMENT_ROOT."/core/lib/ticket.lib.php"; + +// Load translation files required by the page +$langs->load("ticket"); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$value = GETPOST('value', 'alpha'); +$action = GETPOST('action', 'alpha'); +$label = GETPOST('label', 'alpha'); +$scandir = GETPOST('scandir', 'alpha'); +$type = 'ticket'; + +if ($action == 'updateMask') { + $maskconstticket = GETPOST('maskconstticket', 'alpha'); + $maskticket = GETPOST('maskticket', 'alpha'); + + if ($maskconstticket) { + $res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity); + } + + if (!$res > 0) { + $error++; + } + + if (!$error) { + setEventMessage($langs->trans("SetupSaved")); + } else { + setEventMessage($langs->trans("Error"), 'errors'); + } +} elseif ($action == 'setmod') { + // TODO Verifier si module numerotation choisi peut etre active + // par appel methode canBeActivated + + dolibarr_set_const($db, "TICKETSUP_ADDON", $value, 'chaine', 0, '', $conf->entity); +} elseif ($action == 'setvar') { + include_once DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"; + + $notification_email = GETPOST('TICKETS_NOTIFICATION_EMAIL_FROM', 'alpha'); + if (!empty($notification_email)) { + $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + // altairis : differentiate notification email FROM and TO + $notification_email_to = GETPOST('TICKETS_NOTIFICATION_EMAIL_TO', 'alpha'); + if (!empty($notification_email_to)) { + $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $mail_new_ticket = GETPOST('TICKETS_MESSAGE_MAIL_NEW', 'alpha'); + if (!empty($mail_new_ticket)) { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $mail_intro = GETPOST('TICKETS_MESSAGE_MAIL_INTRO', 'alpha'); + if (!empty($mail_intro)) { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $mail_signature = GETPOST('TICKETS_MESSAGE_MAIL_SIGNATURE', 'alpha'); + if (!empty($mail_signature)) { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $url_interface = GETPOST('TICKETS_URL_PUBLIC_INTERFACE', 'alpha'); + if (!empty($mail_signature)) { + $res = dolibarr_set_const($db, 'TICKETS_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $topic_interface = GETPOST('TICKETS_PUBLIC_INTERFACE_TOPIC', 'alpha'); + if (!empty($mail_signature)) { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $text_home = GETPOST('TICKETS_PUBLIC_TEXT_HOME', 'alpha'); + if (!empty($mail_signature)) { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $text_help = GETPOST('TICKETS_PUBLIC_TEXT_HELP_MESSAGE', 'alpha'); + if (!empty($text_help)) { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } +} + +if ($action == 'setvarother') { + $param_enable_public_interface = GETPOST('TICKETS_ENABLE_PUBLIC_INTERFACE', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + + $param_must_exists = GETPOST('TICKETS_EMAIL_MUST_EXISTS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + + $param_disable_email = GETPOST('TICKETS_DISABLE_ALL_MAILS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_DISABLE_ALL_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + + $param_activate_log_by_email = GETPOST('TICKETS_ACTIVATE_LOG_BY_EMAIL', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_ACTIVATE_LOG_BY_EMAIL', $param_activate_log_by_email, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + { + $param_show_module_logo = GETPOST('TICKETS_SHOW_MODULE_LOGO', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + } + + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + { + $param_notification_also_main_addressemail = GETPOST('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + } + + $param_limit_view = GETPOST('TICKETS_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } + + $param_auto_assign = GETPOST('TICKETS_AUTO_ASSIGN_USER_CREATE', 'alpha'); + $res = dolibarr_set_const($db, 'TICKETS_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } +} + + + +/* + * View + */ + +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + +$form = new Form($db); + +$help_url = "FR:Module_Ticket"; +$page_name = "TicketSetup"; +llxHeader('', $langs->trans($page_name), $help_url); + +// Subheader +$linkback = '' . $langs->trans("BackToModuleList") . ''; + +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); + +// Configuration header +$head = ticketAdminPrepareHead(); + +dol_fiche_head($head, 'settings', $langs->trans("Module56000Name"), -1, "ticket"); + +print $langs->trans("TicketSetupDictionaries") . ' : ' . dol_buildpath('/admin/dict.php', 2) . '
'; + +print $langs->trans("TicketPublicAccess") . ' : ' . dol_buildpath('/public/ticket/index.php', 2) . ''; + +dol_fiche_end(); + + +/* + * Projects Numbering model + */ + +print_titre($langs->trans("TicketNumberingModules")); + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir . "core/modules/ticket/"); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + + while (($file = readdir($handle)) !== false) { + if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { + $file = $reg[1]; + $classname = substr($file, 4); + + include_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()) { + print ''; + + // Show example of numbering model + print '' . "\n"; + + print ''; + + $ticket = new Ticket($db); + $ticket->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= '' . $langs->trans("Version") . ': ' . $module->getVersion() . '
'; + $nextval = $module->getNextValue($mysoc, $ticket); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= '' . $langs->trans("NextValue") . ': '; + if ($nextval) { + $htmltooltip .= $nextval . '
'; + } else { + $htmltooltip .= $langs->trans($module->error) . '
'; + } + } + + print ''; + + print ''; + } + } + } + closedir($handle); + } + } +} + +print '
' . $langs->trans("Name") . '' . $langs->trans("Description") . '' . $langs->trans("Example") . '' . $langs->trans("Activated") . '' . $langs->trans("ShortInfo") . '
' . $module->name . "\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->TICKETSUP_ADDON == 'mod_' . $classname) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print '' . img_picto($langs->trans("Disabled"), 'switch_off') . ''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '

'; + +if (!$conf->use_javascript_ajax) { + print '
'; + print ''; + print ''; +} +print_titre($langs->trans("TicketParamPublicInterface")); + +print ''; + +// Activate public interface +print ''; +print ''; +print ''; +print ''; + +// Check if email exists +print ''; +print ''; +print ''; +print ''; + +/*if ($conf->global->MAIN_FEATURES_LEVEL >= 2) +{ + // Show logo for module + print ''; + print ''; + print ''; + print ''; +}*/ + +// Show logo for company +print ''; +print ''; +print ''; +print ''; + +print '
' . $langs->trans("TicketsActivatePublicInterface") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_ENABLE_PUBLIC_INTERFACE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_ENABLE_PUBLIC_INTERFACE", $arrval, $conf->global->TICKETS_ENABLE_PUBLIC_INTERFACE); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsActivatePublicInterfaceHelp"), 1, 'help'); +print '
' . $langs->trans("TicketsEmailMustExist") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_EMAIL_MUST_EXISTS'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKETS_EMAIL_MUST_EXISTS); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'help'); +print '
' . $langs->trans("TicketsShowModuleLogo") . ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_SHOW_MODULE_LOGO'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKETS_SHOW_MODULE_LOGO); + } + print ''; + print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help'); + print '
' . $langs->trans("TicketsShowCompanyLogo") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_SHOW_COMPANY_LOGO'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKETS_SHOW_COMPANY_LOGO); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsShowCompanyLogoHelp"), 1, 'help'); +print '

'; + +print_titre($langs->trans("TicketParams")); +print ''; + +// Activate email notifications +print ''; +print ''; +print ''; +print ''; + +// Activate log by email +print ''; +print ''; +print ''; +print ''; + +// Also send to main email address +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) +{ + print ''; + print ''; + print ''; + print ''; +} + +// Limiter la vue des tickets à ceux assignés à l'utilisateur +print ''; +print ''; +print ''; +print ''; + +if (!$conf->use_javascript_ajax) { + print ''; + print ''; +} + +// Auto assign ticket at user who created it +print ''; +print ''; +print ''; +print ''; + +print '
' . $langs->trans("TicketsDisableEmail") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_DISABLE_ALL_MAILS'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKETS_DISABLE_ALL_MAILS); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help'); +print '
' . $langs->trans("TicketsLogEnableEmail") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_ACTIVATE_LOG_BY_EMAIL'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKETS_ACTIVATE_LOG_BY_EMAIL); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help'); +print '
' . $langs->trans("TicketsEmailAlsoSendToMainAddress") . ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS); + } + print ''; + print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help'); + print '
' . $langs->trans("TicketsLimitViewAssignedOnly") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_LIMIT_VIEW_ASSIGNED_ONLY'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKETS_LIMIT_VIEW_ASSIGNED_ONLY); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help'); +print '
' . $langs->trans("TicketsAutoAssignTicket") . ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('TICKETS_AUTO_ASSIGN_USER_CREATE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("TICKETS_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKETS_AUTO_ASSIGN_USER_CREATE); +} +print ''; +print $form->textwithpicto('', $langs->trans("TicketsAutoAssignTicketHelp"), 1, 'help'); +print '

'; + +if (!$conf->use_javascript_ajax) { + print '
'; +} + +// Admin var of module +print_titre($langs->trans("TicketParamMail")); + +print ''; + +print ''; +print ''; +print ''; + +print ''; +print ''; +print "\n"; + +if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { + print ''; + print ''; + print "\n"; +} + +// Email d'envoi des notifications +print ''; +print ''; +print ''; +print ''; + +// Email de réception des notifications +print ''; +print ''; +print ''; +print ''; + +// Texte de création d'un ticket +$mail_mesg_new = $conf->global->TICKETS_MESSAGE_MAIL_NEW ? $conf->global->TICKETS_MESSAGE_MAIL_NEW : $langs->trans('TicketNewEmailBody'); +print ''; +print ''; + +// Texte d'introduction +$mail_intro = $conf->global->TICKETS_MESSAGE_MAIL_INTRO ? $conf->global->TICKETS_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText'); +print ''; +print ''; + +// Texte de signature +$mail_signature = $conf->global->TICKETS_MESSAGE_MAIL_SIGNATURE ? $conf->global->TICKETS_MESSAGE_MAIL_SIGNATURE : $langs->trans('TicketMessageMailSignatureText'); +print ''; +print ''; + +print ''; +print ''; +print "\n"; + +// Url public interface +$url_interface = $conf->global->TICKETS_URL_PUBLIC_INTERFACE; +print ''; +print ''; +print ''; + +// Interface topic +$url_interface = $conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC; +print ''; +print ''; +print ''; + +// Texte d'accueil homepage +$public_text_home = $conf->global->TICKETS_PUBLIC_TEXT_HOME ? $conf->global->TICKETS_PUBLIC_TEXT_HOME : $langs->trans('TicketPublicInterfaceTextHome'); +print ''; +print ''; + +// Texte d'aide à la saisie du message +$public_text_help_message = $conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'); +print ''; +print ''; + +print ''; +print ''; + +print '
' . $langs->trans("Email") . '
' . $langs->trans("TicketCkEditorEmailNotActivated") . '
' . $langs->trans("TicketEmailNotificationFrom") . ''; +print ''; +print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help'); +print '
' . $langs->trans("TicketEmailNotificationTo") . ''; +print ''; +print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help'); +print '
' . $langs->trans("TicketNewEmailBodyLabel") . ''; +print ''; +require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; +$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor->Create(); +print ''; +print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help'); +print '
' . $langs->trans("TicketMessageMailIntroLabelAdmin") . ''; +print ''; +require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; +$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor->Create(); +print ''; +print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), 1, 'help'); +print '
' . $langs->trans("TicketMessageMailSignatureLabelAdmin") . ''; +print ''; +require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; +$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor->Create(); +print ''; +print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelpAdmin"), 1, 'help'); +print '
' . $langs->trans("PublicInterface") . '
' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . ''; +print ''; +print ''; +print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help'); +print '
' . $langs->trans("TicketPublicInterfaceTopicLabelAdmin") . ''; +print ''; +print ''; +print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help'); +print '
' . $langs->trans("TicketPublicInterfaceTextHomeLabelAdmin") . ''; +print ''; +require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; +$doleditor = new DolEditor('TICKETS_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); +$doleditor->Create(); +print ''; +print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHomeHelpAdmin"), 1, 'help'); +print '
' . $langs->trans("TicketPublicInterfaceTextHelpMessageLabelAdmin") . ''; +print ''; +require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; +$doleditor = new DolEditor('TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); +$doleditor->Create(); +print ''; +print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help'); +print '

'; +print ''; + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php new file mode 100644 index 00000000000..0687a33c52b --- /dev/null +++ b/htdocs/admin/ticket_extrafields.php @@ -0,0 +1,114 @@ + + * + * 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 ticket/admin/ticket_extrafields.php + * \ingroup ticket + * \brief Page to setup extra fields of ticket + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/ticket.lib.php"; +require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('ticket', 'admin')); + +$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 = 'ticket'; //Must be the $table_element of the class that manage extrafield + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +$textobject = $langs->transnoentitiesnoconv("Ticket"); + +$help_url = "FR:Module_Ticket"; +$page_name = "TicketSetup"; +llxHeader('', $langs->trans($page_name), $help_url); + +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans("TicketSetup"), $linkback, 'title_setup'); + +$head = ticketAdminPrepareHead(); + +dol_fiche_head($head, 'attributes', $langs->trans("Module56000Name"), -1, "ticket"); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '"; +} + +/* ************************************************************************** */ +/* */ +/* Creation d'un champ optionnel */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') { + print "
"; + print_titre($langs->trans('NewAttribute')); + + include 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)); + + include DOL_DOCUMENT_ROOT . '/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 7b2c8805f55..1c985e23090 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2012 Regis Houssin +/* Copyright (C) 2006-2018 Laurent Destailleur + * Copyright (C) 2006-2018 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 @@ -36,8 +36,8 @@ $sortorder = GETPOST('sortorder','alpha'); $page = GETPOST('page','int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; -if ($page < 0) { $page = 0; } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +if (empty($page) || $page == -1) { $page = 0; } +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index 68d56bd2ded..d3253c02514 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -116,8 +116,7 @@ function revcompare($x, $y) */ function create_script_table($list) { - global $sortby,$bc,$langs; - $var=true; + global $sortby,$langs; if (GETPOT('order') == "asc" || GETPOST('order') =="desc") { $order = GETPOST('order'); @@ -173,7 +172,6 @@ function create_script_table($list) } foreach($list as $script) { - $var = ! $var; print '
'.dol_trunc($script['file'],80,'left').''.dol_print_date($script['mtime'],'dayhour').'
'; print ''; @@ -206,7 +203,6 @@ function create_key_table($list) print ''; foreach($list as $key) { - $var = !$var; print ''; print ''; print ''; @@ -229,54 +225,49 @@ function create_key_table($list) $form=new Form($db); print load_fiche_titre('Dolibarr eAccelerator '.$info['version'].' control panel','','title_setup'); -$var=true; - print '
'; - print '
'.dol_trunc($key['name'],80,'left').''.dol_print_date($key['created'],'dayhour').'
'; 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 ''; -$var = ! $var; + print ''; print ''; print ''; print ''; -$var = ! $var; + print ''; print ''; print ''; print ''; print '
Information
Caching enabled'.($info['cache']?'yes':'no').'
Optimizer enabled'.$info['optimizer']?'yes':'no'.'
Memory usage'.number_format(100 * $info['memoryAllocated']/$info['memorySize'], 2).'%('.number_format($info['memoryAllocated'] / (1024*1024), 2).'MB / '.number_format($info['memorySize']/(1024*1024), 2).'MB)
Free memory in reserved cache'.number_format($info['memoryAvailable']/(1024*1024), 2).'MB
Cached scripts'.$info['cachedScripts'].'
Removed scripts'.$info['removedScripts'].'
Cached keys'.(isset($info['cachedKeys'])?$info['cachedKeys']:'').'
'; -$var=true; - $resCached = @eaccelerator_cached_scripts(); // If success return an array $resRemoved = @eaccelerator_removed_scripts(); @@ -288,12 +279,11 @@ if (is_array($resCached) || is_array($resRemoved)) { print '
Actions
Caching
Optimizer
Clear cache
Clean cache
Purge cache
'.$trigger['picto'].''.$trigger['file'].'
'; print (empty($module->name)?$name:$module->name); print "\n"; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 54a91d6ee92..80144f93c1f 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -31,10 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; -$langs->load("errors"); -$langs->load("admin"); -$langs->load("companies"); -$langs->load("website"); +// Load translation files required by the page +$langs->loadlangs(array('errors', 'admin', 'companies', 'website')); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $confirm=GETPOST('confirm','alpha'); @@ -64,7 +62,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('admin')); +$hookmanager->initHooks(array('website')); // Name of SQL tables of dictionaries $tabname=array(); @@ -436,24 +434,7 @@ 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->order($sortfield,$sortorder); $sql.=$db->plimit($limit+1, $offset); //print $sql; @@ -514,15 +495,7 @@ if ($id) } } - $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 (empty($reshook)) - { - fieldListWebsites($fieldlist,$obj,$tabname[$id],'add'); - } + fieldListWebsites($fieldlist,$obj,$tabname[$id],'add'); print ''; if ($action != 'edit') @@ -602,7 +575,7 @@ if ($id) { $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 + $reshook=$hookmanager->executeHooks('editWebsiteFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; if (empty($reshook)) fieldListWebsites($fieldlist,$obj,$tabname[$id],'edit'); @@ -614,7 +587,7 @@ if ($id) { $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 + $reshook=$hookmanager->executeHooks('viewWebsiteFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index e54f19dc8c9..c688da0e550 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -31,10 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; -$langs->load("errors"); -$langs->load("admin"); -$langs->load("companies"); -$langs->load("website"); +// Load translation files required by the page +$langs->loadLangs(array('errors', 'admin', 'companies', 'website')); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $confirm=GETPOST('confirm','alpha'); diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 79dacc3276e..da87cfd32c9 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("admin","workflow","propal","workflow","orders","supplier_proposals")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index d075da3f344..c3b54e36b6c 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -30,6 +30,7 @@ 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'; +// Load translation files required by the page $langs->load("admin"); diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 57efe8d7cb9..4017f3c93ac 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -1,9 +1,9 @@ +/* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2016 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2012-2018 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 @@ -29,6 +29,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) @@ -41,7 +42,7 @@ if ($action == 'setproductionmode') { $status = GETPOST('status','alpha'); - if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', $conf->entity) > 0) + if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', 0) > 0) { $error=0; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index df87efcd8c3..92391a14dc0 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -140,7 +140,6 @@ class DolibarrApi unset($object->class_element_line); unset($object->picto); - unset($object->facturee); // Replace with billed unset($object->fieldsforcombobox); unset($object->comments); diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 65ba8f4ff37..ef2b4c8bb6d 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -66,7 +66,8 @@ class Setup extends DolibarrApi $sql = "SELECT id, code, type, libelle as label, module"; $sql.= " FROM ".MAIN_DB_PREFIX."c_paiement as t"; - $sql.= " WHERE t.active = ".$active; + $sql.= " WHERE t.entity IN (".getEntity('c_paiement').")"; + $sql.= " AND t.active = ".$active; // Add sql filters if ($sqlfilters) { @@ -169,7 +170,7 @@ class Setup extends DolibarrApi // and then apply the filter if there is one. $this->translateLabel($country, $lang); - if (empty($filter) || stripos($country->label, $filter) !== FALSE) { + if (empty($filter) || stripos($country->label, $filter) !== false) { $list[] = $this->_cleanObjectDatas($country); } } @@ -384,7 +385,7 @@ class Setup extends DolibarrApi * @param string $sortorder Sort order * @param string $type Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...) * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')" - * @return List of events types + * @return List of extra fields * * @url GET extrafields * @@ -538,7 +539,8 @@ class Setup extends DolibarrApi $sql = "SELECT rowid as id, code, sortorder, libelle as label, libelle_facture as descr, type_cdr, nbjour, decalage, module"; $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; - $sql.= " WHERE t.active = ".$active; + $sql.= " WHERE t.entity IN (".getEntity('c_payment_term').")"; + $sql.= " AND t.active = ".$active; // Add sql filters if ($sqlfilters) { @@ -582,7 +584,7 @@ class Setup extends DolibarrApi * Do a test of integrity for files and setup. * * @param string $target Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr. - * @return Result of file and setup integrity check + * @return Result of file and setup integrity check * * @url GET checkintegrity * diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 353b945cfda..e66a19c981a 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -24,12 +24,7 @@ * \file htdocs/api/index.php */ -//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 diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php new file mode 100644 index 00000000000..1cdf78df4bf --- /dev/null +++ b/htdocs/asset/admin/assets_extrafields.php @@ -0,0 +1,114 @@ + + * Copyright (C) 2018 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 + * 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/asset/admin/asset_extrafields.php + * \ingroup asset + * \brief Page to setup extra fields of assets + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("assets","admin","companies")); + +$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->transnoentitiesnoconv($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='don'; //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("Assets"); + +llxHeader('',$langs->trans("AssetsSetup")); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("AssetsSetup"),$linkback,'title_setup'); + + +$head = AssetsAdminPrepareHead(); + +dol_fiche_head($head, 'attributes', $langs->trans("Assets"), -1, 'generic'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print ''; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Create optional field */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print "
"; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edit optional field */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php new file mode 100644 index 00000000000..d828bffa4de --- /dev/null +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -0,0 +1,112 @@ + + * + * 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/asset/admin/assets_type_extrafields.php + * \ingroup asset + * \brief Page to setup extra fields type of assets + */ +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('assets', 'admin')); + +$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->transnoentitiesnoconv($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='adherent_type'; //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("AssetsTypes"); + +llxHeader('',$langs->trans("AssetsSetup")); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("AssetsSetup"),$linkback,'title_setup'); + + +$head = AssetsAdminPrepareHead(); + +dol_fiche_head($head, 'attributes_type', $langs->trans("Assets"), -1, 'generic'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print ''; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation of an optional field */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print "
"; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition of an optional field */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php new file mode 100644 index 00000000000..c240f350590 --- /dev/null +++ b/htdocs/asset/admin/setup.php @@ -0,0 +1,115 @@ + + * Copyright (C) 2018 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 + * 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/asset/admin/setup.php + * \ingroup assets + * \brief Assets setup page. + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php"; + +global $langs, $user; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "assets")); + +// Access control +if (! $user->admin) accessforbidden(); + +// Parameters +$action = GETPOST('action', 'alpha'); +$backtopage = GETPOST('backtopage', 'alpha'); + +$arrayofparameters=array('FIXEDASSETS_MYPARAM1'=>array('css'=>'minwidth200'), 'FIXEDASSETS_MYPARAM2'=>array('css'=>'minwidth500')); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; + + +/* + * View + */ + +llxHeader('',$langs->trans("AssetsSetup")); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("AssetsSetup"),$linkback,'title_setup'); + + +$head = AssetsAdminPrepareHead(); + +dol_fiche_head($head, 'settings', $langs->trans("Assets"), -1, 'generic'); + + +if ($action == 'edit') +{ + print '
'; + print ''; + print ''; + + print ''; + print ''; + + foreach($arrayofparameters as $key => $val) + { + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $form->textwithpicto($langs->trans($key),$langs->trans($key.'Tooltip')); + print '
'; + + print '
'; + print ''; + print '
'; + + print '
'; + print '
'; +} +else +{ + print ''; + print ''; + + foreach($arrayofparameters as $key => $val) + { + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $form->textwithpicto($langs->trans($key),$langs->trans($key.'Tooltip')); + print '' . $conf->global->$key . '
'; + + print '
'; + print ''.$langs->trans("Modify").''; + print '
'; +} + + +// Page end +dol_fiche_end(); + +llxFooter(); +$db->close(); diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php new file mode 100644 index 00000000000..a34169ea0ac --- /dev/null +++ b/htdocs/asset/card.php @@ -0,0 +1,372 @@ + + * Copyright (C) 2018 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 + * 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 card.php + * \ingroup asset + * \brief Page to create/edit/view asset + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; +include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); +include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("asset")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object=new Asset($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + +// Initialize array of search criterias +$search_all=trim(GETPOST("search_all",'alpha')); +$search=array(); +foreach($object->fields as $key => $val) +{ + if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key,'alpha'); +} + +if (empty($action) && empty($id) && empty($ref)) $action='view'; + +// Security check - Protection if external user +//if ($user->societe_id > 0) access_forbidden(); +//if ($user->societe_id > 0) $socid = $user->societe_id; +//$result = restrictedArea($user, 'asset', $id); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals + + + +/* + * 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)) +{ + $error=0; + + $permissiontoadd = $user->rights->asset->create; + $permissiontodelete = $user->rights->asset->delete; + $backurlforlist = dol_buildpath('/asset/list.php',1); + + // Actions cancel, add, update or delete + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + // Actions to send emails + $trigger_name='MYOBJECT_SENTBYMAIL'; + $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; + $trackid='asset'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; +} + + + + +/* + * View + * + * Put here all code to build page + */ + +$form=new Form($db); +$formfile=new FormFile($db); + +$title=$langs->trans("Assets").' - '.$langs->trans("Card"); +$help_url=''; +llxHeader('',$title,$help_url); + +// Example : Adding jquery code +print ''; + + +// Part to create +if ($action == 'create') +{ + print load_fiche_titre($langs->trans("NewAsset")); + + print '
'; + print ''; + print ''; + print ''; + + dol_fiche_head(array(), ''); + + print ''."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; + + print '
'."\n"; + + dol_fiche_end(); + + print '
'; + print ''; + print '  '; + print ''; // Cancel for create does not post form if we don't know the backtopage + print '
'; + + print '
'; +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') +{ + print load_fiche_titre($langs->trans("Assets")); + + print '
'; + print ''; + print ''; + print ''; + print ''; + + dol_fiche_head(); + + print ''."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; + + print '
'; + + dol_fiche_end(); + + print '
'; + print '   '; + print '
'; + + print '
'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) +{ + $res = $object->fetch_optionals($object->id, $extralabels); + + $head = AssetsPrepareHead($object); + dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, 'generic'); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAssets'), $langs->trans('ConfirmDeleteAssets'), 'confirm_delete', '', 0, 1); + } + + // Confirmation of action xxxx + if ($action == 'xxx') + { + $formquestion=array(); + /* + $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' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); + }*/ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + 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; + + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + $morehtmlref='
'; + /* + // Ref bis + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->asset->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->asset->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); + */ + $morehtmlref.='
'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + print '
'; + print '
'; + print ''."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswithonsecondcolumn'; + include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + print ''; + + print '

'; + + dol_fiche_end(); + + + // Buttons for actions + if ($action != 'presend' && $action != 'editline') { + 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)) + { + // Send + print '' . $langs->trans('SendMail') . ''."\n"; + + if ($user->rights->asset->write) + { + print ''.$langs->trans("Modify").''."\n"; + } + else + { + print ''.$langs->trans('Modify').''."\n"; + } + + if ($user->rights->asset->delete) + { + print ''.$langs->trans('Delete').''."\n"; + } + else + { + print ''.$langs->trans('Delete').''."\n"; + } + } + print '
'."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') + { + print '
'; + print ''; // ancre + + // Documents + /*$objref = dol_sanitizeFileName($object->ref); + $relativepath = $comref . '/' . $comref . '.pdf'; + $filedir = $conf->asset->dir_output . '/' . $objref; + $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; + $genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->asset->create; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); + */ + + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('asset')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '
'; + + $MAXEVENT = 10; + + $morehtmlright = ''; + $morehtmlright.= $langs->trans("SeeAll"); + $morehtmlright.= ''; + + // List of actions on element + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'asset', $socid, 1, '', $MAXEVENT, '', $morehtmlright); + + print '
'; + } + + //Select mail models is same action as presend + /* + if (GETPOST('modelselected')) $action = 'presend'; + + // Presend form + $modelmail='inventory'; + $defaulttopic='InformationMessage'; + $diroutput = $conf->product->dir_output.'/inventory'; + $trackid = 'stockinv'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; + */ +} + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php new file mode 100644 index 00000000000..4ab05ce675c --- /dev/null +++ b/htdocs/asset/class/asset.class.php @@ -0,0 +1,464 @@ + + * Copyright (C) 2018 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 + * 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 asset/class/asset.class.php + * \ingroup asset + * \brief This file is a CRUD class file for asset (Create/Read/Update/Delete) + */ + +require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; + +/** + * Class for Asset + */ +class Asset extends CommonObject +{ + /** + * @var string ID to identify managed object + */ + public $element = 'asset'; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'asset'; + /** + * @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + */ + public $ismultientitymanaged = 0; + /** + * @var int Does asset support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 1; + /** + * @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png + */ + public $picto = 'asset'; + + + /** + * 'type' if the field format. + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed. + * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * 'index' if we want an index in database. + * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). + * 'position' is the sort order of field. + * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. + * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'help' is a string visible as a tooltip on field + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'default' is a default value for creation (can still be replaced by the global setup of default values) + * 'showoncombobox' if field must be shown into the label of combobox + */ + + /** + * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + */ + public $fields=array( + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), + 'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object",), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text",), + 'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), + 'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), + 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",), + 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-2, 'enabled'=>1, 'position'=>501, 'notnull'=>1,), + 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-2, 'enabled'=>1, 'position'=>510, 'notnull'=>1,), + 'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'visible'=>-2, 'enabled'=>1, 'position'=>511, 'notnull'=>-1,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'visible'=>-2, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1,), + 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Active', '-1'=>'Cancel')), + ); + public $rowid; + public $ref; + public $entity; + public $label; + public $amount; + public $fk_soc; + public $description; + public $note_public; + public $note_private; + public $date_creation; + public $tms; + public $fk_user_creat; + public $fk_user_modif; + public $import_key; + public $status; + + // If this object has a subtable with lines + + /** + * @var int Name of subtable line + */ + //public $table_element_line = 'assetdet'; + /** + * @var int Field with ID of parent key if this field has a parent + */ + //public $fk_element = 'fk_asset'; + /** + * @var int Name of subtable class that manage subtable lines + */ + //public $class_element_line = 'Assetline'; + /** + * @var array Array of child tables (child tables to delete before deleting a record) + */ + //protected $childtables=array('assetdet'); + /** + * @var AssetLine[] Array of subtable lines + */ + //public $lines = array(); + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + global $conf; + + $this->db = $db; + + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible']=0; + if (empty($conf->multicompany->enabled)) $this->fields['entity']['enabled']=0; + } + + /** + * Create object into database + * + * @param User $user User that creates + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, Id of created object if OK + */ + public function create(User $user, $notrigger = false) + { + return $this->createCommon($user, $notrigger); + } + + /** + * Clone and object into another one + * + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return mixed New object created, <0 if KO + */ + public function createFromClone(User $user, $fromid) + { + global $hookmanager, $langs; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $object->fetchCommon($fromid); + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + $object->ref = "copy_of_".$object->ref; + $object->title = $langs->trans("CopyOf")." ".$object->title; + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + // End + if (!$error) { + $this->db->commit(); + return $object; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Load object in memory from the database + * + * @param int $id Id object + * @param string $ref Ref + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetch($id, $ref = null) + { + $result = $this->fetchCommon($id, $ref); + //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + return $result; + } + + /** + * Load object lines in memory from the database + * + * @return int <0 if KO, 0 if not found, >0 if OK + */ + /*public function fetchLines() + { + $this->lines=array(); + + // Load lines with object AssetsLine + + return count($this->lines)?1:0; + }*/ + + /** + * Update object into database + * + * @param User $user User that modifies + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update(User $user, $notrigger = false) + { + return $this->updateCommon($user, $notrigger); + } + + /** + * Delete object in database + * + * @param User $user User that deletes + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = false) + { + return $this->deleteCommon($user, $notrigger); + } + + /** + * Return a link to the object card (with optionaly the picto) + * + * @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 ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + { + global $db, $conf, $langs; + global $dolibarr_main_authentication, $dolibarr_main_demo; + global $menumanager; + + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips + + $result = ''; + $companylink = ''; + + $label = '' . $langs->trans("Asset") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; + + $url = dol_buildpath('/assets/card.php',1).'?id='.$this->id; + + if ($option != 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } + + $linkclose=''; + if (empty($notooltip)) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowAssets"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; + } + else $linkclose = ($morecss?' class="'.$morecss.'"':''); + + $linkstart = ''; + $linkend=''; + + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->ref; + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + 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); + } + + /** + * Return the status + * + * @param int $status Id status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @return string Label of status + */ + static 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'); + } + if ($mode == 6) + { + 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'); + } + } + + /** + * Charge les informations d'ordre info dans l'objet commande + * + * @param int $id Id of order + * @return void + */ + function info($id) + { + $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; + $sql.= ' fk_user_creat, fk_user_modif'; + $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + $sql.= ' WHERE t.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; + if ($obj->fk_user_author) + { + $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->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); + $this->date_validation = $this->db->jdate($obj->datev); + } + + $this->db->free($result); + + } + else + { + dol_print_error($this->db); + } + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->initAsSpecimenCommon(); + } + + + /** + * Action executed by scheduler + * CAN BE A CRON TASK + * + * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) + */ + public function doScheduledJob() + { + global $conf, $langs; + + $this->output = ''; + $this->error=''; + + dol_syslog(__METHOD__, LOG_DEBUG); + + return 0; + } +} \ No newline at end of file diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php new file mode 100644 index 00000000000..51ea3a0c799 --- /dev/null +++ b/htdocs/asset/class/asset_type.class.php @@ -0,0 +1,433 @@ + + * + * 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/asset/class/asset_type.class.php + * \ingroup asset + * \brief File of class to manage asset types + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; + + +/** + * Class to manage asset type + */ +class AssetType extends CommonObject +{ + public $table_element = 'asset_type'; + public $element = 'asset_type'; + public $picto = 'group'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** @var string Label */ + public $label; + /** @var string Accountancy code asset */ + public $accountancy_code_asset; + /** @var string Accountancy code depreciation asset */ + public $accountancy_code_depreciation_asset; + /** @var string Accountancy code depreciation expense */ + public $accountancy_code_depreciation_expense; + /** @var string Public note */ + public $note; + /** @var array Array of asset */ + public $asset=array(); + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + } + + + /** + * Fonction qui permet de creer le type d'immobilisation + * + * @param User $user User making creation + * @param int $notrigger 1=do not execute triggers, 0 otherwise + * @return int >0 if OK, < 0 if KO + */ + function create($user,$notrigger=0) + { + global $conf; + + $error=0; + + $this->label=trim($this->label); + $this->accountancy_code_asset = trim($this->accountancy_code_asset); + $this->accountancy_code_depreciation_asset = trim($this->accountancy_code_depreciation_asset); + $this->accountancy_code_depreciation_expense = trim($this->accountancy_code_depreciation_expense); + + $this->db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."asset_type ("; + $sql.= "label"; + $sql.= ", accountancy_code_asset"; + $sql.= ", accountancy_code_depreciation_asset"; + $sql.= ", accountancy_code_depreciation_expense"; + $sql.= ", entity"; + $sql.= ") VALUES ("; + $sql.= "'".$this->db->escape($this->label)."'"; + $sql.= ", '".$this->db->escape($this->accountancy_code_asset)."'"; + $sql.= ", '".$this->db->escape($this->accountancy_code_depreciation_asset)."'"; + $sql.= ", '".$this->db->escape($this->accountancy_code_depreciation_expense)."'"; + $sql.= ", ".$conf->entity; + $sql.= ")"; + + dol_syslog("Asset_type::create", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."asset_type"); + + $result = $this->update($user,1); + if ($result < 0) + { + $this->db->rollback(); + return -3; + } + + if (! $notrigger) + { + // Call trigger + $result=$this->call_trigger('ASSET_TYPE_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers + } + + if (! $error) + { + $this->db->commit(); + return $this->id; + } + else + { + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); + $this->db->rollback(); + return -2; + } + } + else + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } + + /** + * Met a jour en base donnees du type + * + * @param User $user Object user making change + * @param int $notrigger 1=do not execute triggers, 0 otherwise + * @return int >0 if OK, < 0 if KO + */ + function update($user,$notrigger=0) + { + global $conf, $hookmanager; + + $error=0; + + $this->label=trim($this->label); + + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."asset_type "; + $sql.= "SET "; + $sql.= "label = '".$this->db->escape($this->label) ."',"; + $sql.= "accountancy_code_asset = '".$this->db->escape($this->accountancy_code_asset)."',"; + $sql.= "accountancy_code_depreciation_asset = '".$this->db->escape($this->accountancy_code_depreciation_asset)."',"; + $sql.= "accountancy_code_depreciation_expense = '".$this->db->escape($this->accountancy_code_depreciation_expense)."'"; + $sql.= " WHERE rowid =".$this->id; + + $result = $this->db->query($sql); + if ($result) + { + $action='update'; + + // Actions on extra fields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('ASSET_TYPE_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); + return -$error; + } + } + else + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } + + /** + * Fonction qui permet de supprimer le status de l'adherent + * + * @return int >0 if OK, 0 if not found, < 0 if KO + */ + function delete() + { + global $user; + + $error = 0; + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."asset_type"; + $sql.= " WHERE rowid = ".$this->id; + + $resql=$this->db->query($sql); + if ($resql) + { + // Call trigger + $result=$this->call_trigger('ASSET_TYPE_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -2; } + // End call triggers + + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + $this->error=$this->db->lasterror(); + return -1; + } + } + + /** + * Fonction qui permet de recuperer le status de l'immobilisation + * + * @param int $rowid Id of member type to load + * @return int <0 if KO, >0 if OK + */ + function fetch($rowid) + { + $sql = "SELECT d.rowid, d.label as label, d.accountancy_code_asset, d.accountancy_code_depreciation_asset, d.accountancy_code_depreciation_expense, d.note"; + $sql .= " FROM ".MAIN_DB_PREFIX."asset_type as d"; + $sql .= " WHERE d.rowid = ".(int) $rowid; + + dol_syslog("Asset_type::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->rowid; + $this->label = $obj->label; + $this->accountancy_code_asset = $obj->accountancy_code_asset; + $this->accountancy_code_depreciation_asset = $obj->accountancy_code_depreciation_asset; + $this->accountancy_code_depreciation_expense = $obj->accountancy_code_depreciation_expense; + $this->note = $obj->note; + } + + return 1; + } + else + { + $this->error=$this->db->lasterror(); + return -1; + } + } + + /** + * Return list of asset's type + * + * @return array List of types of members + */ + function liste_array() + { + global $conf,$langs; + + $assettypes = array(); + + $sql = "SELECT rowid, label as label"; + $sql.= " FROM ".MAIN_DB_PREFIX."asset_type"; + $sql.= " WHERE entity IN (".getEntity('asset_type').")"; + + $resql=$this->db->query($sql); + if ($resql) + { + $nump = $this->db->num_rows($resql); + + if ($nump) + { + $i = 0; + while ($i < $nump) + { + $obj = $this->db->fetch_object($resql); + + $assettypes[$obj->rowid] = $langs->trans($obj->label); + $i++; + } + } + } + else + { + print $this->db->error(); + } + return $assettypes; + } + + /** + * Return array of Asset objects for asset type this->id (or all if this->id not defined) + * + * @param string $excludefilter Filter to exclude + * @param int $mode 0=Return array of asset instance + * 1=Return array of asset instance without extra data + * 2=Return array of asset id only + * @return mixed Array of asset or -1 on error + */ + function listAssetForAssetType($excludefilter='', $mode=0) + { + global $conf, $user; + + $ret=array(); + + $sql = "SELECT a.rowid"; + $sql.= " FROM ".MAIN_DB_PREFIX."asset as a"; + $sql.= " WHERE a.entity IN (".getEntity('asset').")"; + $sql.= " AND a.fk_asset_type = ".$this->id; + if (! empty($excludefilter)) $sql.=' AND ('.$excludefilter.')'; + + dol_syslog(get_class($this)."::listAssetsForGroup", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + while ($obj = $this->db->fetch_object($resql)) + { + if (! array_key_exists($obj->rowid, $ret)) + { + if ($mode < 2) + { + $assetstatic=new Asset($this->db); + if ($mode == 1) { + $assetstatic->fetch($obj->rowid,'','','',false, false); + } else { + $assetstatic->fetch($obj->rowid); + } + $ret[$obj->rowid]=$assetstatic; + } + else $ret[$obj->rowid]=$obj->rowid; + } + } + + $this->db->free($resql); + + $this->asset=$ret; + + return $ret; + } + else + { + $this->error=$this->db->lasterror(); + return -1; + } + } + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $maxlen length max label + * @param int $notooltip 1=Disable tooltip + * @return string String with URL + */ + function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + { + global $langs; + + $result=''; + $label=$langs->trans("ShowTypeCard",$this->label); + + $linkstart = ''; + $linkend=''; + + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= ($maxlen?dol_trunc($this->label,$maxlen):$this->label); + $result .= $linkend; + + return $result; + } + + /** + * 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 $conf, $user, $langs; + + // Initialize parameters + $this->id = 0; + $this->ref = 'ATSPEC'; + $this->specimen=1; + + $this->label='ASSET TYPE SPECIMEN'; + $this->note='This is a note'; + + // Assets of this asset type is just me + $this->asset=array( + $user->id => $user + ); + } + + /** + * getLibStatut + * + * @return string Return status of a type of asset + */ + function getLibStatut() + { + return ''; + } + +} diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php new file mode 100644 index 00000000000..66baaae196c --- /dev/null +++ b/htdocs/asset/document.php @@ -0,0 +1,153 @@ + + * Copyright (C) 2018 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 + * 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 document.php + * \ingroup asset + * \brief Tab for documents linked to Assets + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.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'; + +// Load translation files required by the page +$langs->loadLangs(array("assets","companies")); + + +$action=GETPOST('action','aZ09'); +$confirm=GETPOST('confirm'); +$id=(GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int')); +$ref = GETPOST('ref', 'alpha'); + +// Security check - Protection if external user +//if ($user->societe_id > 0) access_forbidden(); +//if ($user->societe_id > 0) $socid = $user->societe_id; +//$result = restrictedArea($user, 'asset', $id); + +// Get parameters +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="name"; + +// Initialize technical objects +$object=new Asset($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('assetdocument')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('asset'); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals + +//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->id); +if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->ref); + + + +/* + * Actions + */ + +include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title=$langs->trans("Assets").' - '.$langs->trans("Files"); +$help_url=''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +if ($object->id) +{ + /* + * Show tabs + */ + if (! empty($conf->notification->enabled)) $langs->load("mails"); + $head = AssetsPrepareHead($object); + + dol_fiche_head($head, 'document', $langs->trans("Asset"), -1, 'generic'); + + + // 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']; + } + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + + print '
'; + print ''; + + // Number of files + print ''; + + // Total size + print ''; + + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; + + print '
'; + + dol_fiche_end(); + + $modulepart = 'asset'; + //$permission = $user->rights->asset->create; + $permission = 1; + //$permtoedit = $user->rights->asset->create; + $permtoedit = 1; + $param = '&id=' . $object->id; + + //$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile='asset/' . dol_sanitizeFileName($object->ref).'/'; + + include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; +} +else +{ + accessforbidden('',0,0); +} + + +llxFooter(); +$db->close(); diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php new file mode 100644 index 00000000000..71460f31a2c --- /dev/null +++ b/htdocs/asset/info.php @@ -0,0 +1,83 @@ + + * + * 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 info.php + * \ingroup asset + * \brief Page to show an asset information + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("asset")); + +$id = GETPOST('id','int'); +$ref=GETPOST('ref','alpha'); +$action=GETPOST('action','alpha'); + +// Security check +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'asset', $id, ''); + +$object = new Asset($db); +$object->fetch($id); + +/* + * Actions + */ + +/* + * View + */ +$title = $langs->trans('Asset') . " - " . $langs->trans('Info'); +$helpurl = ""; +llxHeader('', $title, $helpurl); + +$form = new Form($db); + +$object->info($id); + +$head = AssetsPrepareHead($object); + +dol_fiche_head($head, 'info', $langs->trans("Asset"), -1, 'generic'); + +$linkback = ''.$langs->trans("BackToList").''; + +$morehtmlref='
'; +$morehtmlref.='
'; + +dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref); + +print '
'; +print '
'; + +print '
'; + +print '
'; +dol_print_object_info($object); +print '
'; + +print '
'; + +dol_fiche_end(); + +llxFooter(); +$db->close(); diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php new file mode 100644 index 00000000000..903ebc83aad --- /dev/null +++ b/htdocs/asset/list.php @@ -0,0 +1,531 @@ + + * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 . + */ + +/** + * \file list.php + * \ingroup asset + * \brief List page for asset + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("assets")); + +$action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$massaction = GETPOST('massaction','alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files','int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm','alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'assetslist'; // To manage different context of search +$backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print') + +$id = GETPOST('id','int'); + +// Load variable for pagination +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$sortfield = GETPOST('sortfield','alpha'); +$sortorder = GETPOST('sortorder','alpha'); +$page = GETPOST('page','int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object=new Asset($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('assetlist')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition. +if (! $sortorder) $sortorder="ASC"; + +// Protection if external user +$socid=0; +if ($user->societe_id > 0) +{ + //$socid = $user->societe_id; + accessforbidden(); +} +//$result = restrictedArea($user, 'asset', $id,''); + +// Initialize array of search criterias +$search_all=trim(GETPOST("search_all",'alpha')); +$search=array(); +foreach($object->fields as $key => $val) +{ + if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key,'alpha'); +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach($object->fields as $key => $val) +{ + if ($val['searchall']) $fieldstosearchall['t.'.$key]=$val['label']; +} + +// Definition of fields for list +$arrayfields=array(); +foreach($object->fields as $key => $val) +{ + // If $val['visible']==0, then we never show the field + if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); +} +// Extra fields +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +{ + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); + } +} +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + + + +/* + * Actions + * + * Put here all code to do according to value of "$action" parameter + */ + +if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; } +if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } + +$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)) +{ + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + // Purge search criteria + if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers + { + foreach($object->fields as $key => $val) + { + $search[$key]=''; + } + $toselect=''; + $search_array_options=array(); + } + if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha') + || GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha')) + { + $massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation + } + + // Mass actions + $objectclass='Asset'; + $objectlabel='Asset'; + $permtoread = $user->rights->asset->read; + $permtodelete = $user->rights->asset->delete; + $uploaddir = $conf->asset->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + * + * Put here all code to render page + */ + +$form=new Form($db); + +$now=dol_now(); + +//$help_url="EN:Module_Asset|FR:Module_Asset_FR|ES:Módulo_Asset"; +$help_url=''; +$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Assets")); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +foreach($object->fields as $key => $val) +{ + $sql.='t.'.$key.', '; +} +// Add fields from extrafields +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql=preg_replace('/, $/','', $sql); +$sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."assets_extrafields as ef on (t.rowid = ef.fk_object)"; +if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('assets').")"; +else $sql.=" WHERE 1 = 1"; +foreach($search as $key => $val) +{ + $mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))?1:0); + if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:$mode_search)); +} +if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all); +// Add where from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; + +/* If a group by is required +$sql.= " GROUP BY " +foreach($object->fields as $key => $val) +{ + $sql.='t.'.$key.', '; +} +// Add fields from extrafields +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : ''); +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +*/ + +$sql.=$db->order($sortfield,$sortorder); + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } +} + +$sql.= $db->plimit($limit+1, $offset); + +$resql=$db->query($sql); +if (! $resql) +{ + dol_print_error($db); + exit; +} + +$num = $db->num_rows($resql); + +// Direct jump if only one record found +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) +{ + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".DOL_URL_ROOT.'/assets/card.php?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +print ''; + +$arrayofselected=is_array($toselect)?$toselect:array(); + +$param=''; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); +foreach($search as $key => $val) +{ + $param.= '&search_'.$key.'='.urlencode($search[$key]); +} +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +// List of mass actions available +$arrayofmassactions = array( + //'presend'=>$langs->trans("SendByMail"), + //'builddoc'=>$langs->trans("PDFMerge"), +); +if ($user->rights->asset->delete) $arrayofmassactions['predelete']=$langs->trans("Delete"); +if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +$massactionbutton=$form->selectMassAction('', $arrayofmassactions); + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail="SendAssetsRef"; +$modelmail="asset"; +$objecttmp=new Asset($db); +$trackid='xxxx'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($sall) +{ + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); +} + +$moreforfilter = ''; +/*$moreforfilter.='
'; +$moreforfilter.= $langs->trans('MyFilter') . ': '; +$moreforfilter.= '
';*/ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // 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 $moreforfilter; + print '
'; +} + +$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; +$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print ''."\n"; + + +// Fields title search +// -------------------------------------------------------------------- +print ''; +foreach($object->fields as $key => $val) +{ + $align=''; + if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; + if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; + if ($key == 'status') $align.=($align?' ':'').'center'; + if (! empty($arrayfields['t.'.$key]['checked'])) print ''; +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + +// Fields from hook +$parameters=array('arrayfields'=>$arrayfields); +$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +// Action column +print ''; +print ''."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print ''; +foreach($object->fields as $key => $val) +{ + $align=''; + if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; + if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; + if ($key == 'status') $align.=($align?' ':'').'center'; + if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n"; +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; +// Hook fields +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); +$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; +print ''."\n"; + + +// Detect if we need a fetch on each output line +$needToFetchEachLine=0; +foreach ($extrafields->attribute_computed as $key => $val) +{ + if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object +} + + +// Loop on record +// -------------------------------------------------------------------- +$i=0; +$totalarray=array(); +while ($i < min($num, $limit)) +{ + $obj = $db->fetch_object($resql); + if (empty($obj)) break; // Should not happen + + // Store properties in $object + $object->id = $obj->rowid; + foreach($object->fields as $key => $val) + { + if (isset($obj->$key)) $object->$key = $obj->$key; + } + + // Show here line of result + print ''; + foreach($object->fields as $key => $val) + { + $align=''; + if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; + if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; + if ($key == 'status') $align.=($align?' ':'').'center'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print ''; + print $object->showOutputField($val, $key, $obj->$key, ''); + print ''; + if (! $i) $totalarray['nbfield']++; + if (! empty($val['isameasure'])) + { + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.'.$key; + $totalarray['val']['t.'.$key] += $obj->$key; + } + } + } + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column + print ''; + if (! $i) $totalarray['nbfield']++; + + print ''; + + $i++; +} + +// Show total line +if (isset($totalarray['pos'])) +{ + print ''; + $i=0; + while ($i < $totalarray['nbfield']) + { + $i++; + if (! empty($totalarray['pos'][$i])) print ''; + else + { + if ($i == 1) + { + if ($num < $limit) print ''; + else print ''; + } + else print ''; + } + } + print ''; +} + +// If no record found +if ($num == 0) +{ + $colspan=1; + foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; } + print ''; +} + + +$db->free($resql); + +$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; +$searchpicto=$form->showFilterButtons(); +print $searchpicto; +print '
'; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected=0; + if (in_array($obj->rowid, $arrayofselected)) $selected=1; + print ''; + } + print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; + +print '
'."\n"; + +if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) +{ + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) + { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new FormFile($db); + + // Show list of available documents + $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource.=str_replace('&','&',$param); + + $filedir=$diroutputmassaction; + $genallowed=$user->rights->asset->read; + $delallowed=$user->rights->asset->create; + + print $formfile->showdocuments('massfilesarea_asset','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,''); + } + else + { + print '
'.$langs->trans("ShowTempMassFilesArea").''; + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php new file mode 100644 index 00000000000..cf0166df96f --- /dev/null +++ b/htdocs/asset/note.php @@ -0,0 +1,149 @@ + + * Copyright (C) 2018 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 + * 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 note.php + * \ingroup asset + * \brief Card with notes on Asset + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("asset","companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object=new Asset($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('assetnote')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('asset'); + +// Security check - Protection if external user +//if ($user->societe_id > 0) access_forbidden(); +//if ($user->societe_id > 0) $socid = $user->societe_id; +//$result = restrictedArea($user, 'asset', $id); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals +if ($id > 0 || ! empty($ref)) $upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id; + +$permissionnote=1; +//$permissionnote=$user->rights->asset->creer; // Used by the include of actions_setnotes.inc.php + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + + +/* + * View + */ + +$form = new Form($db); + +//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$help_url=''; +llxHeader('',$langs->trans('Assets'),$help_url); + +if ($id > 0 || ! empty($ref)) +{ + $object->fetch_thirdparty(); + + $head = AssetsPrepareHead($object); + + dol_fiche_head($head, 'note', $langs->trans("Asset"), -1, 'generic'); + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + $morehtmlref='
'; + /* + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->asset->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } + }*/ + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + + + $cssclass="titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '
'; + + dol_fiche_end(); +} + + +llxFooter(); +$db->close(); diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php new file mode 100644 index 00000000000..f4409ee5417 --- /dev/null +++ b/htdocs/asset/type.php @@ -0,0 +1,857 @@ + + * + * 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/asset/type.php + * \ingroup asset + * \brief Asset's type setup + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset_type.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; + +// Load translation files required by the page +$langs->load("assets"); + +$rowid = GETPOST('rowid','int'); +$action = GETPOST('action','alpha'); +$cancel = GETPOST('cancel','alpha'); +$backtopage = GETPOST('backtopage','alpha'); + +$type = GETPOST('type','alpha'); + +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $limit * $page ; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortorder) { $sortorder="DESC"; } +if (! $sortfield) { $sortfield="d.lastname"; } + +$label=GETPOST("label","alpha"); +$comment=GETPOST("comment"); + +// Security check +$result=restrictedArea($user,'asset',$rowid,'asset_type'); + +$object = new AssetType($db); + +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label('asset_type'); + +if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers +{ + $type=""; + $sall=""; +} + + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('assettypecard','globalcard')); + + +/* + * Actions + */ + +if ($cancel) { + + $action=''; + + if (! empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } +} + +if ($action == 'add' && $user->rights->asset->write) +{ + $object->label = trim($label); + $object->accountancy_code_asset = trim($accountancy_code_asset); + $object->accountancy_code_depreciation_asset = trim($accountancy_code_depreciation_asset); + $object->accountancy_code_depreciation_expense = trim($accountancy_code_depreciation_expense); + $object->note = trim($comment); + + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if ($ret < 0) $error++; + + if (empty($object->label)) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), null, 'errors'); + } + else { + $sql = "SELECT label FROM ".MAIN_DB_PREFIX."asset_type WHERE label='".$db->escape($object->label)."'"; + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + } + if ($num) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorLabelAlreadyExists",$login), null, 'errors'); + } + } + + if (! $error) + { + $id=$object->create($user); + if ($id > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create'; + } + } + else + { + $action = 'create'; + } +} + +if ($action == 'update' && $user->rights->asset->write) +{ + $object->fetch($rowid); + + $object->oldcopy = clone $object; + + $object->label = trim($label); + $object->accountancy_code_asset = trim($accountancy_code_asset); + $object->accountancy_code_depreciation_asset = trim($accountancy_code_depreciation_asset); + $object->accountancy_code_depreciation_expense = trim($accountancy_code_depreciation_expense); + $object->note = trim($comment); + + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if ($ret < 0) $error++; + + $ret=$object->update($user); + + if ($ret >= 0 && ! count($object->errors)) + { + setEventMessages($langs->trans("AssetsTypeModified"), null, 'mesgs'); + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } + + header("Location: ".$_SERVER["PHP_SELF"]."?rowid=".$object->id); + exit; +} + +if ($action == 'confirm_delete' && $user->rights->asset->write) +{ + $object->fetch($rowid); + $res=$object->delete(); + + if ($res > 0) + { + setEventMessages($langs->trans("AssetsTypeDeleted"), null, 'mesgs'); + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + setEventMessages($langs->trans("AssetsTypeCanNotBeDeleted"), null, 'errors'); + $action=''; + } +} + + +/* + * View + */ + +$form=new Form($db); +$helpurl=''; +llxHeader('',$langs->trans("AssetsTypeSetup"),$helpurl); + + +// List of asset type +if (! $rowid && $action != 'create' && $action != 'edit') +{ + //dol_fiche_head(''); + + $sql = "SELECT d.rowid, d.label as label, d.accountancy_code_asset, d.accountancy_code_depreciation_asset, d.accountancy_code_depreciation_expense, d.note"; + $sql.= " FROM ".MAIN_DB_PREFIX."asset_type as d"; + $sql.= " WHERE d.entity IN (".getEntity('asset_type').")"; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $nbtotalofrecords = $num; + + $i = 0; + + $param = ''; + + print '
'; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); + + $moreforfilter = ''; + + print '
'; + print ''."\n"; + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + $assettype = new AssetType($db); + + while ($i < $num) + { + $objp = $db->fetch_object($result); + + $assettype->id = $objp->rowid; + $assettype->ref = $objp->rowid; + $assettype->label = $objp->rowid; + + print ''; + print ''; + print ''; + + print ''; + + print ''; + + print ''; + + if ($user->rights->asset->write) + print ''; + else + print ''; + print ""; + $i++; + } + print "
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("AccountancyCodeAsset").''.$langs->trans("AccountancyCodeDepreciationAsset").''.$langs->trans("AccountancyCodeDepreciationExpense").' 
'; + print $assettype->getNomUrl(1); + //'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.' + print ''.dol_escape_htmltag($objp->label).''; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch('',$object->accountancy_code_asset,1); + + print $accountingaccount->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_asset; + } + print ''; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount2 = new AccountingAccount($db); + $accountingaccount2->fetch('',$object->accountancy_code_depreciation_asset,1); + + print $accountingaccount2->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_depreciation_asset; + } + print ''; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount3 = new AccountingAccount($db); + $accountingaccount3->fetch('',$object->accountancy_code_depreciation_expense,1); + + print $accountingaccount3->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_depreciation_expense; + } + print 'rowid.'">'.img_edit().' 
"; + print '
'; + + print '
'; + } + else + { + dol_print_error($db); + } +} + + +/* ************************************************************************** */ +/* */ +/* Creation mode */ +/* */ +/* ************************************************************************** */ +if ($action == 'create') +{ + $object = new AssetType($db); + if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); + + print load_fiche_titre($langs->trans("NewAssetType")); + + print '
'; + print ''; + print ''; + + dol_fiche_head(''); + + print ''; + print ''; + + print ''; + + if (! empty($conf->accounting->enabled)) + { + // Accountancy_code_asset + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + + } + else // For external software + { + // Accountancy_code_asset + print ''; + print ''; + + // Accountancy_code_depreciation_asset + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + } + + print ''; + + // Other attributes + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook)) + { + print $object->showOptionals($extrafields,'edit'); + } + print ''; + print "
'.$langs->trans("Label").'
'.$langs->trans("AccountancyCodeAsset").''; + print $formaccounting->select_account($object->accountancy_code_asset, 'accountancy_code_asset', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeDepreciationAsset").''; + print $formaccounting->select_account($object->accountancy_code_depreciation_asset, 'accountancy_code_depreciation_asset', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeDepreciationExpense").''; + print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeAsset").''; + print '
'.$langs->trans("AccountancyCodeDepreciationAsset").''; + print '
'.$langs->trans("AccountancyCodeDepreciationExpense").''; + print '
'.$langs->trans("Description").''; + print '
\n"; + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print "
\n"; +} + +/* ************************************************************************** */ +/* */ +/* View mode */ +/* */ +/* ************************************************************************** */ +if ($rowid > 0) +{ + if ($action != 'edit') + { + $object = new AssetType($db); + $object->fetch($rowid); + $object->fetch_optionals(); + + /* + * Confirmation suppression + */ + if ($action == 'delete') + { + print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$object->id,$langs->trans("DeleteAMemberType"),$langs->trans("ConfirmDeleteMemberType",$object->label),"confirm_delete", '',0,1); + } + + $head = asset_type_prepare_head($object); + + dol_fiche_head($head, 'card', $langs->trans("AssetType"), -1, 'setup'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'rowid', $linkback); + + print '
'; + print '
'; + + print ''; + + print ''; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch('',$object->accountancy_code_asset,1); + + print $accountingaccount->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_asset; + } + print ''; + + print ''; + + print ''; + + print '"; + + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print '
'; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount2 = new AccountingAccount($db); + $accountingaccount2->fetch('',$object->accountancy_code_depreciation_asset,1); + + print $accountingaccount2->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_depreciation_asset; + } + print ''; + if (! empty($conf->accounting->enabled)) + { + $accountingaccount3 = new AccountingAccount($db); + $accountingaccount3->fetch('',$object->accountancy_code_depreciation_expense,1); + + print $accountingaccount3->getNomUrl(0,1,1,'',1); + } else { + print $object->accountancy_code_depreciation_expense; + } + print '
'.$langs->trans("Description").''; + print nl2br($object->note)."
'; + print '
'; + + dol_fiche_end(); + + /* + * Buttons + */ + + print '
'; + + // Edit + if ($user->rights->asset->write) + { + print ''; + } + + // Add + print ''; + + // Delete + if ($user->rights->asset->write) + { + print ''; + } + + print "
"; + + + // Show list of assets (nearly same code than in page list.php) + $assettypestatic=new AssetType($db); + + $now=dol_now(); + + $sql = "SELECT a.rowid, d.login, d.firstname, d.lastname, d.societe, "; + $sql.= " d.datefin,"; + $sql.= " a.fk_asset_type as type_id,"; + $sql.= " t.label as type"; + $sql.= " FROM ".MAIN_DB_PREFIX."asset as a, ".MAIN_DB_PREFIX."asset_type as t"; + $sql.= " WHERE a.fk_asset_type = t.rowid"; + $sql.= " AND a.entity IN (".getEntity('asset').")"; + $sql.= " AND t.rowid = ".$object->id; + if ($sall) + { + $sql.=natural_search(array("f.firstname","d.lastname","d.societe","d.email","d.login","d.address","d.town","d.note_public","d.note_private"), $sall); + } + if ($status != '') + { + $sql.= natural_search('d.statut', $status, 2); + } + if ($action == 'search') + { + if (GETPOST('search','alpha')) + { + $sql.= natural_search(array("d.firstname","d.lastname"), GETPOST('search','alpha')); + } + } + if (! empty($search_lastname)) + { + $sql.= natural_search(array("d.firstname","d.lastname"), $search_lastname); + } + if (! empty($search_login)) + { + $sql.= natural_search("d.login", $search_login); + } + if (! empty($search_email)) + { + $sql.= natural_search("d.email", $search_email); + } + if ($filter == 'uptodate') + { + $sql.=" AND datefin >= '".$db->idate($now)."'"; + } + if ($filter == 'outofdate') + { + $sql.=" AND datefin < '".$db->idate($now)."'"; + } + + $sql.= " ".$db->order($sortfield,$sortorder); + + // Count total nb of records + $nbtotalofrecords = ''; + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) + { + $resql = $db->query($sql); + if ($resql) $nbtotalofrecords = $db->num_rows($result); + else dol_print_error($db); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } + } + + $sql.= " ".$db->plimit($conf->liste_limit+1, $offset); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + $titre=$langs->trans("AssetsList"); + if ($status != '') + { + if ($status == '-1,1') { $titre=$langs->trans("MembersListQualified"); } + else if ($status == '-1') { $titre=$langs->trans("MembersListToValid"); } + else if ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); } + else if ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); } + else if ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } + else if ($status == '0') { $titre=$langs->trans("MembersListResiliated"); } + } + elseif ($action == 'search') + { + $titre=$langs->trans("MembersListQualified"); + } + + if ($type > 0) + { + $assettype=new AssetType($db); + $result=$assettype->fetch($type); + $titre.=" (".$assettype->label.")"; + } + + $param="&rowid=".$object->id; + if (! empty($status)) $param.="&status=".$status; + if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; + if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname; + if (! empty($search_login)) $param.="&search_login=".$search_login; + if (! empty($search_email)) $param.="&search_email=".$search_email; + if (! empty($filter)) $param.="&filter=".$filter; + + if ($sall) + { + print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; + } + + print '
'; + print '
'."\n"; + + // Lignes des champs de filtre + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print "\n"; + + print ''; + print_liste_field_titre( $langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); + print_liste_field_titre("Login",$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); + print_liste_field_titre("Nature",$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); + print_liste_field_titre("EMail",$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder); + print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"d.statut,d.datefin",$param,"","",$sortfield,$sortorder); + print_liste_field_titre("EndSubscription",$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre("Action",$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder); + print "\n"; + + while ($i < $num && $i < $conf->liste_limit) + { + $objp = $db->fetch_object($resql); + + $datefin=$db->jdate($objp->datefin); + + $adh=new Asset($db); + $adh->lastname=$objp->lastname; + $adh->firstname=$objp->firstname; + + // Lastname + print ''; + if ($objp->societe != '') + { + print ''."\n"; + } + else + { + print ''."\n"; + } + + // Login + print "\n"; + + // Type + /*print ''; + */ + + // Moral/Physique + print "\n"; + + // EMail + print "\n"; + + // Statut + print '"; + + // Actions + print '"; + + print "\n"; + $i++; + } + + print "
'; + print ''; + print ' '; + print ' '; + print ''; + print '  '; + print ''; + print '
'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).''.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,32).'".$objp->login."'; + $assettypestatic->id=$objp->type_id; + $assettypestatic->label=$objp->type; + print $assettypestatic->getNomUrl(1,12); + print '".$adh->getmorphylib($objp->morphy)."".dol_print_email($objp->email,0,0,1)."'; + print $adh->LibStatut($objp->statut,$objp->subscription,$datefin,2); + print "'; + if ($user->rights->asset->creer) + { + print ''.img_edit().''; + } + print ' '; + if ($user->rights->asset->supprimer) + { + print ''.img_picto($langs->trans("Resiliate"),'disable.png').''; + } + print "
\n"; + print ''; + print ''; + + if ($num > $conf->liste_limit) + { + print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,''); + } + } + else + { + dol_print_error($db); + } + + } + + /* ************************************************************************** */ + /* */ + /* Edition mode */ + /* */ + /* ************************************************************************** */ + + if ($action == 'edit') + { + $object = new AssetType($db); + $object->fetch($rowid); + $object->fetch_optionals(); + if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); + + $head = asset_type_prepare_head($object); + + print '
'; + print ''; + print ''; + print ''; + + dol_fiche_head($head, 'card', $langs->trans("AssetsType"), -1, 'setup'); + + print ''; + + print ''; + + print ''; + + if (! empty($conf->accounting->enabled)) + { + // Accountancy_code_asset + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + + } + else // For external software + { + // Accountancy_code_asset + print ''; + print ''; + + // Accountancy_code_depreciation_asset + print ''; + print ''; + + // Accountancy_code_depreciation_expense + print ''; + print ''; + } + + print ''; + + // Other attributes + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook)) + { + print $object->showOptionals($extrafields,'edit'); + } + + print '
'.$langs->trans("Ref").''.$object->id.'
'.$langs->trans("Label").'
'.$langs->trans("AccountancyCodeAsset").''; + print $formaccounting->select_account($object->accountancy_code_asset, 'accountancy_code_asset', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeDepreciationAsset").''; + print $formaccounting->select_account($object->accountancy_code_depreciation_asset, 'accountancy_code_depreciation_asset', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeDepreciationExpense").''; + print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCodeAsset").''; + print '
'.$langs->trans("AccountancyCodeDepreciationAsset").''; + print '
'.$langs->trans("AccountancyCodeDepreciationExpense").''; + print '
'.$langs->trans("Description").''; + print '
'; + + // Extra field + if (empty($reshook)) + { + print '

'; + foreach($extrafields->attribute_label as $key=>$label) + { + if (isset($_POST["options_" . $key])) { + if (is_array($_POST["options_" . $key])) { + // $_POST["options"] is an array but following code expects a comma separated string + $value = implode(",", $_POST["options_" . $key]); + } else { + $value = $_POST["options_" . $key]; + } + } else { + $value = $adht->array_options["options_" . $key]; + } + print '\n"; + } + print '
'.$label.''; + print $extrafields->showInputField($key,$value); + print "


'; + } + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print "
"; + } +} + + +llxFooter(); + +$db->close(); diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index 69a9a96f032..8cd5ff979a0 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -28,8 +28,6 @@ * write = system,call,log,verbose,command,agent,user */ -//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'); diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 5e684b4091d..26386052480 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -25,10 +25,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("errors"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'members', 'errors', 'other')); // Choice of print year or current year. $now = dol_now(); @@ -212,7 +210,8 @@ if ($conf->societe->enabled) { $nbno=$nbtotal=0; - print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','object_company'); + print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','title_companies'); + print '
'."\n"; $sql="SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''"; $resql=$db->query($sql); @@ -253,7 +252,7 @@ if ($conf->product->enabled || $conf->product->service) $nbno=$nbtotal=0; - print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','object_product'); + print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','title_products'); print '
'."\n"; $sql ="SELECT count(rowid) as nb, fk_product_type, datec"; diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 04a181d3613..7dfec76b39e 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; -$langs->load("admin"); -$langs->load("members"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'members', 'errors')); // Choice of print year or current year. $now = dol_now(); diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index e4b38a9568f..326fea79c5d 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("admin","other","blockedlog")); if (! $user->admin || empty($conf->blockedlog->enabled)) accessforbidden(); diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index e8b2dc8b73b..dbb0affdbdf 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("admin", "other", "blockedlog", "bills")); if ((! $user->admin && ! $user->rights->blockedlog->read) || empty($conf->blockedlog->enabled)) accessforbidden(); diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index 929fd8401d5..7bde15aa879 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -27,10 +27,8 @@ // Directory to scan (full path) is inside POST['dir']. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); $res=require '../../master.inc.php'; diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php index 24fd71f0514..873b904e7a2 100644 --- a/htdocs/blockedlog/ajax/block-add.php +++ b/htdocs/blockedlog/ajax/block-add.php @@ -27,10 +27,8 @@ // Directory to scan (full path) is inside POST['dir']. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); $res=require '../../main.inc.php'; diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php index d4d4eef4e07..7a4ebebb2cf 100644 --- a/htdocs/blockedlog/ajax/block-info.php +++ b/htdocs/blockedlog/ajax/block-info.php @@ -27,10 +27,8 @@ // Directory to scan (full path) is inside POST['dir']. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); require '../../main.inc.php'; diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index 4b50474b4a9..199f9051e07 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -27,10 +27,8 @@ // Directory to scan (full path) is inside POST['dir']. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); require '../../main.inc.php'; diff --git a/htdocs/theme/common/octicons/index.html b/htdocs/blockedlog/ajax/index.html similarity index 100% rename from htdocs/theme/common/octicons/index.html rename to htdocs/blockedlog/ajax/index.html diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 6a38bc3ab49..0210491fba7 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -103,6 +103,7 @@ class BlockedLog public $ref_object = ''; public $object_data = null; + public $user_fullname=''; /** * Array of tracked event codes @@ -312,12 +313,15 @@ class BlockedLog * @param Object $object object to store * @param string $action action * @param string $amounts amounts + * @param User $fuser User object (forced) * @return int >0 if OK, <0 if KO */ - public function setObjectData(&$object, $action, $amounts) + public function setObjectData(&$object, $action, $amounts, $fuser = null) { global $langs, $user, $mysoc; + if (is_object($fuser)) $user = $fuser; + // Generic fields // action diff --git a/htdocs/blockedlog/class/index.html b/htdocs/blockedlog/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/blockedlog/index.html b/htdocs/blockedlog/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 9b3bea82af1..25fa032902f 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -25,6 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) @@ -68,8 +69,6 @@ print '
'; print ''; print ''; -$var=true; - print ''; print ''; print ''; diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index dcc6d8cdeab..d450e476506 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -27,15 +27,15 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; -$langs->load("bookmarks"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('bookmarks', 'other')); // Security check if (! $user->rights->bookmark->lire) { restrictedArea($user, 'bookmarks'); } -$id=GETPOST("id"); +$id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); $title=GETPOST("title","alpha"); $url=GETPOST("url","alpha"); diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 2aa3024920f..ac5a89c66f3 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -24,8 +24,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; -$langs->load("bookmarks"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('bookmarks', 'admin')); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); @@ -81,7 +81,15 @@ $userstatic=new User($db); llxHeader('', $langs->trans("ListOfBookmarks")); -print load_fiche_titre($langs->trans("ListOfBookmarks")); +$newcardbutton=''; +if ($user->rights->bookmark->creer) +{ + $newcardbutton=''.$langs->trans('NewBookmark').''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} + +print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); $sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; @@ -117,12 +125,10 @@ if ($resql) print_liste_field_titre(''); print "\n"; - $var=True; while ($i < $num) { $obj = $db->fetch_object($resql); - print ''; // Id @@ -204,16 +210,6 @@ else } - -print "
\n"; - -if ($user->rights->bookmark->creer) -{ - print ''.$langs->trans("NewBookmark").''; -} - -print '
'; - llxFooter(); $db->close(); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 5a68b37caac..f4af16b3739 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -38,8 +38,8 @@ if (! empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("cashdesk"); +// Load translation files required by the page +$langs->loadLangs(array("admin", "cashdesk")); /* @@ -91,7 +91,6 @@ print '
'; // Mode -$var=true; print ''; print ''; print ''; @@ -162,7 +161,6 @@ if (! empty($conf->stock->enabled)) if (! empty($conf->service->enabled)) { - $var=! $var; print ''; print ''."\n"; print ''; -$var=true; $form = new Form($db); // Mail required for members @@ -123,4 +123,4 @@ print ''; print '
'.$langs->trans("Name").'
'; print $langs->trans("CashdeskShowServices"); print ''; @@ -173,7 +171,6 @@ if (! empty($conf->service->enabled)) // Use Dolibarr Receipt Printer if (! empty($conf->receiptprinter->enabled)) { - $var=! $var; print '
'; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print ''; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 769a69a23fa..a0e992e9da9 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -292,7 +292,7 @@ class Facturation else if ( $aId == 'RESET' ) { - $this->id = NULL; + $this->id = null; } else @@ -318,7 +318,7 @@ class Facturation } else if ( $aRef == 'RESET' ) { - $this->ref = NULL; + $this->ref = null; } else { @@ -342,7 +342,7 @@ class Facturation else if ( $aQte == 'RESET' ) { - $this->qte = NULL; + $this->qte = null; } else { @@ -366,7 +366,7 @@ class Facturation } else if ( $aStock == 'RESET' ) { - $this->stock = NULL; + $this->stock = null; } else { @@ -390,7 +390,7 @@ class Facturation } else if ($aRemisePercent == 'RESET') { - $this->remise_percent = NULL; + $this->remise_percent = null; } else { @@ -414,7 +414,7 @@ class Facturation } else if ( $aMontantRemise == 'RESET' ) { - $this->montant_remise = NULL; + $this->montant_remise = null; } else { @@ -439,7 +439,7 @@ class Facturation } else if ( $aPrix == 'RESET' ) { - $this->prix = NULL; + $this->prix = null; } else { @@ -463,7 +463,7 @@ class Facturation } else if ( $aTva == 'RESET' ) { - $this->tva = NULL; + $this->tva = null; } else { @@ -487,7 +487,7 @@ class Facturation } else if ( $aNumFacture == 'RESET' ) { - $this->num_facture = NULL; + $this->num_facture = null; } else { @@ -511,7 +511,7 @@ class Facturation } else if ( $aModeReglement == 'RESET' ) { - $this->mode_reglement = NULL; + $this->mode_reglement = null; } else { @@ -536,7 +536,7 @@ class Facturation } else if ( $aMontantEncaisse == 'RESET' ) { - $this->montant_encaisse = NULL; + $this->montant_encaisse = null; } else { @@ -560,7 +560,7 @@ class Facturation return $this->montant_rendu; } else if ( $aMontantRendu == 'RESET' ) { - $this->montant_rendu = NULL; + $this->montant_rendu = null; } else { @@ -584,7 +584,7 @@ class Facturation } else if ( $aPaiementLe == 'RESET' ) { - $this->paiement_le = NULL; + $this->paiement_le = null; } else { @@ -607,7 +607,7 @@ class Facturation } else if ( $aTotalHt == 'RESET' ) { - $this->prix_total_ht = NULL; + $this->prix_total_ht = null; } else { @@ -630,7 +630,7 @@ class Facturation } else if ( $aMontantTva == 'RESET' ) { - $this->montant_tva = NULL; + $this->montant_tva = null; } else { @@ -654,7 +654,7 @@ class Facturation } else if ( $aTotalTtc == 'RESET' ) { - $this->prix_total_ttc = NULL; + $this->prix_total_ttc = null; } else { diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index 72fbd509535..e1a1dcc6bc8 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -24,16 +24,12 @@ */ -//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'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // Change this following line to use the correct relative path (../, ../../, etc) require '../main.inc.php'; diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 25ddfd8c1f8..cdeeaf6c424 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur + * Copyright (C) 2018 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 @@ -150,7 +151,8 @@ switch($action) $obj_facturation->id($ret['rowid']); $obj_facturation->ref($ret['ref']); $obj_facturation->stock($ret['reel']); - $obj_facturation->prix($ret['price']); + //$obj_facturation->prix($ret['price']); + $obj_facturation->prix($pu_ht); $vatrate = $tva_tx; diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index aed83d641f3..146ae3d40b6 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -183,7 +183,7 @@ $langs->load("cashdesk"); else print ''; print ''; print '
'; - if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] < 0) + if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CB']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] < 0) { $langs->load("errors"); print ''; @@ -191,7 +191,7 @@ $langs->load("cashdesk"); else print ''; print '
'; print '
'; - if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CB']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] < 0) + if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] < 0) { $langs->load("errors"); print ''; diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index c1564e1b892..92e23a2199a 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; if (!$user->admin) accessforbidden(); +// Load translation files required by the page $langs->load("categories"); $action=GETPOST('action','aZ09'); @@ -38,7 +39,7 @@ $action=GETPOST('action','aZ09'); * Actions */ -if (preg_match('/set_(.*)/',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) @@ -52,7 +53,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } } -if (preg_match('/del_(.*)/',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -93,7 +94,6 @@ print '
 '.$langs->trans("Value").'
'; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 3e5a252264f..3fd7d1c69b5 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -28,8 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("categories"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('categories', 'admin')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 9f49e42f060..db56902347b 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -31,6 +31,7 @@ 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'; +// Load translation files required by the page $langs->load("categories"); // Security check @@ -268,7 +269,7 @@ if ($user->rights->categorie->creer) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 46332f9f979..c559d760f0f 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -172,7 +172,7 @@ class Categories extends DolibarrApi * @param array $request_data Request data * @return int ID of category */ - function post($request_data = NULL) + function post($request_data = null) { if(! DolibarrApiAccess::$user->rights->categorie->creer) { throw new RestException(401); @@ -197,7 +197,7 @@ class Categories extends DolibarrApi * @param array $request_data Datas * @return int */ - function put($id, $request_data = NULL) + function put($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->categorie->creer) { throw new RestException(401); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index ada86667f44..70b2108dd4c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -338,28 +338,23 @@ class Categorie extends CommonObject $action='create'; - // Actions on extra fields (by external module or standard code) - // TODO the hook duplicates the trigger !! - $hookmanager->initHooks(array('HookModuleNamedao')); - $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)) + // Actions on extra fields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + $result=$this->insertExtraFields(); + if ($result < 0) { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $error++; } } - else if ($reshook < 0) $error++; - // Call trigger - $result=$this->call_trigger('CATEGORY_CREATE',$user); - if ($result < 0) { $error++; } - // End call triggers + if (! $error) + { + // Call trigger + $result=$this->call_trigger('CATEGORY_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers + } if ( ! $error ) { @@ -432,28 +427,23 @@ class Categorie extends CommonObject { $action='update'; - // Actions on extra fields (by external module or standard code) - // TODO the hook duplicates the trigger !! - $hookmanager->initHooks(array('HookCategorydao')); - $parameters=array(); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) + // Actions on extra fields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + $result=$this->insertExtraFields(); + if ($result < 0) { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $error++; } } - else if ($reshook < 0) $error++; - // Call trigger - $result=$this->call_trigger('CATEGORY_MODIFY',$user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } - // End call triggers + if (! $error) + { + // Call trigger + $result=$this->call_trigger('CATEGORY_MODIFY',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + } $this->db->commit(); @@ -653,18 +643,6 @@ class Categorie extends CommonObject if ($this->id == -1) return -2; - // For backward compatibility - 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') - { - $type = 'supplier'; - dol_syslog(get_class($this) . "::add_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING); - } - $this->db->begin(); $sql = "INSERT INTO " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type]; @@ -718,7 +696,6 @@ class Categorie extends CommonObject // Call trigger - $this->linkto=$obj; // Deprecated. Save object we want to link category to into category instance to provide information to trigger $this->context=array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger $result=$this->call_trigger('CATEGORY_LINK',$user); if ($result < 0) { $error++; } @@ -784,11 +761,9 @@ class Categorie extends CommonObject dol_syslog(get_class($this).'::del_type', LOG_DEBUG); if ($this->db->query($sql)) { - // Save object we want to unlink category off into category instance to provide information to trigger - $this->unlinkoff=$obj; - // Call trigger - $result=$this->call_trigger('CATEGORY_UNLINK',$user); + $this->context=array('unlinkoff'=>$obj); // Save object we want to link category to into category instance to provide information to trigger + $result=$this->call_trigger('CATEGORY_UNLINK',$user); if ($result < 0) { $error++; } // End call triggers @@ -918,24 +893,23 @@ class Categorie extends CommonObject $sql.= ' AND s.rowid = sub.fk_categorie'; $sql.= ' AND sub.'.$subcol_name.' = '.$id; + $sql.= $this->db->order($sortfield, $sortorder); + + $offset = 0; $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $this->db->query($sql); $nbtotalofrecords = $this->db->num_rows($result); - } - - $sql.= $this->db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 { $page = 0; + $offset = 0; } - $offset = $limit * $page; - - $sql.= $this->db->plimit($limit + 1, $offset); } + $sql.= $this->db->plimit($limit + 1, $offset); + $result = $this->db->query($sql); if ($result) { @@ -1204,6 +1178,8 @@ class Categorie extends CommonObject */ function get_all_categories($type=null, $parent=false) { + if (! is_numeric($type)) $type = $this->MAP_ID[$type]; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; $sql.= " WHERE entity IN (".getEntity('category').")"; if (! is_null($type)) @@ -1230,30 +1206,6 @@ class Categorie extends CommonObject } } - /** - * Returns total number of categories - * - * @return int Number of categories - * @deprecated function not used ? - */ - function get_nb_categories() - { - $sql = "SELECT count(rowid)"; - $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; - $sql.= " WHERE entity IN (".getEntity('category').")"; - $res = $this->db->query($sql); - if ($res) - { - $res = $this->db->fetch_array($res); - return $res[0]; - } - else - { - dol_print_error($this->db); - return -1; - } - } - /** * Check if no category with same label already exists for this cat's parent or root and for this cat's type * diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 4ccd9116d74..b420847f6fd 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -29,6 +29,7 @@ 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'; +// Load translation files required by the page $langs->load("categories"); $id=GETPOST('id','int'); @@ -176,7 +177,7 @@ print '
'; print ''; print ''; print ''; -print ''; /* // faire une rech dans une sous categorie uniquement @@ -111,7 +112,6 @@ if ($catname || $id > 0) print '
'.$langs->trans("Search").'
'; +print '
'; print $langs->trans("Name").':
'; print ''; - $var=true; foreach ($cats as $cat) { print "\t".''."\n"; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index e6047ed2149..472a8eb9b95 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -32,8 +32,8 @@ 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/lib/categories.lib.php'; -$langs->load("categories"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadlangs(array('categories', 'bills')); $id=GETPOST('id','int'); diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 40b40eab921..7d71b43a81b 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -32,8 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -$langs->load("categories"); -$langs->load("languages"); +// Load translation files required by the page +$langs->loadLangs(array('categories', 'languages')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index f6a0417bbda..24e70e7d587 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -31,7 +31,7 @@ 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'; - +// Load translation files required by the page $langs->load("categories"); $id = GETPOST('id','int'); @@ -368,13 +368,12 @@ if ($type == Categorie::TYPE_PRODUCT) print '\n"; // Link to delete from category print '\n"; // Link to delete from category print '\n"; // Link to delete from category print '\n"; // Link to delete from category print '\n"; // Link to delete from category print '\n"; // Link to delete from category print ''."\n"; print '\n"; print '\n"; print '\n"; // Link to delete from category print ''; print "\n"; - $var=true; while ($i < min($num,$limit)) { $obj=$db->fetch_object($resql); diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 6547f453b21..9c8b275d198 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/address.class.php'; -$langs->load("companies"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'commercial')); $id = GETPOST('id','int'); $action = GETPOST('action','alpha'); diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index 3c95c39c88d..6a6aa12862a 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -28,9 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load('propal'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'propal')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 9c85504d458..49784228fe6 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("propal"); +// Load translation files required by the page +$langs->loadlangs(array('admin', 'other', 'propal')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index fb8154e76ba..f5ddc38e52c 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -45,8 +45,8 @@ if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/c if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; if (! empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -$langs->load("companies"); -$langs->load('banks'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'banks')); if (! empty($conf->contrat->enabled)) $langs->load("contracts"); if (! empty($conf->commande->enabled)) $langs->load("orders"); @@ -82,7 +82,7 @@ $extrafields = new ExtraFields($db); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('commcard','globalcard')); +$hookmanager->initHooks(array('thirdpartycomm','globalcard')); /* @@ -278,29 +278,38 @@ if ($object->id > 0) print ''; } + // This fields are used to know VAT to include in an invoice when the thirdparty is making a sale, so when it is a supplier. + // We don't need them into customer profile. + // Except for spain and localtax where localtax depends on buyer and not seller + // VAT is used + /* print ''; - print ''; + print ''; print ''; print ''; + */ - // Local Taxes - // TODO Move this on same record than VATIsUsed - if ($mysoc->localtax1_assuj=="1") + if ($mysoc->country_code == 'ES') { - print ''; + // Local Taxes + if ($mysoc->localtax1_assuj=="1") + { + print ''; + } + if ($mysoc->localtax1_assuj=="1") + { + print ''; + } } - if ($mysoc->localtax1_assuj=="1") - { - print ''; - } - // TVA Intra print ''; print ''; - } + $i = 0; while ($i < $num && $i < $MAXLIST) { @@ -985,8 +996,6 @@ if ($object->id > 0) */ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - $invoicetemplate = new FactureRec($db); - $sql = 'SELECT f.rowid as id, f.titre as ref, f.amount'; $sql.= ', f.total as total_ht'; $sql.= ', f.tva as total_tva'; @@ -1009,9 +1018,9 @@ if ($object->id > 0) $resql=$db->query($sql); if ($resql) { - $var=true; + $invoicetemplate = new FactureRec($db); + $num = $db->num_rows($resql); - $i = 0; if ($num > 0) { print '
'.$langs->trans("FoundCats").'
'.$prod->label."'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -416,13 +415,12 @@ if ($type == Categorie::TYPE_SUPPLIER) print "'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -470,13 +468,12 @@ if($type == Categorie::TYPE_CUSTOMER) print "'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -524,13 +521,12 @@ if ($type == Categorie::TYPE_MEMBER) print ''.$member->firstname."'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -575,14 +571,12 @@ if ($type == Categorie::TYPE_CONTACT) print "'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_CONTACT) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -629,14 +623,12 @@ if ($type == Categorie::TYPE_ACCOUNT) print ''.$account->number."'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_ACCOUNT) $permission=$user->rights->banque->configurer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; @@ -676,20 +668,18 @@ if ($type == Categorie::TYPE_PROJECT) { print "\t".'
'; - print $project->getNomUrl(1,0); + print $project->getNomUrl(1); print "'.$project->ref."'.$project->title."'; - $typeid=$object->type; $permission=0; - if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); - if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; - if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; - if ($typeid == Categorie::TYPE_ACCOUNT) $permission=$user->rights->banque->configurer; - if ($typeid == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; + if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); + if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer; + if ($type == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer; + if ($type == Categorie::TYPE_PROJECT) $permission=$user->rights->projet->creer; if ($permission) { print ""; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d0d97f83435..1d6a0286b68 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -42,12 +42,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("commercial"); -$langs->load("other"); -$langs->load("bills"); -$langs->load("orders"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array("companies", "other", "commercial", "bills", "orders", "agenda")); $action=GETPOST('action','alpha'); $cancel=GETPOST('cancel','alpha'); @@ -417,6 +413,7 @@ if ($action == 'update') $object->location = GETPOST('location'); $object->socid = GETPOST("socid"); $socpeopleassigned = GETPOST("socpeopleassigned",'array'); + $object->socpeopleassigned = array(); foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid); $object->contactid = GETPOST("contactid",'int'); $object->fk_project = GETPOST("projectid",'int'); @@ -908,7 +905,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } @@ -1260,7 +1257,7 @@ if ($id > 0) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } @@ -1291,7 +1288,7 @@ if ($id > 0) } $linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); - $linkback.= ''.$langs->trans("BackToList").''; + $linkback.= ''.$langs->trans("BackToList").''; // Link to other agenda views $out=''; @@ -1603,7 +1600,6 @@ if ($id > 0) $genallowed=$user->rights->agenda->myactions->read; $delallowed=$user->rights->agenda->myactions->create; - $var=true; print $formfile->showdocuments('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 6452e3ca922..0c7ad11cb3c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -164,6 +164,7 @@ class ActionComm extends CommonObject // Properties for links to other objects var $fk_element; // Id of record + var $elementid; // Id of record alternative for API var $elementtype; // Type of record. This if property ->element of object linked to. // Ical @@ -280,6 +281,7 @@ class ActionComm extends CommonObject return -1; } } + $code = empty($this->code)?$this->type_code:$this->code; // Check parameters if (! $this->type_id) @@ -308,14 +310,15 @@ class ActionComm extends CommonObject $sql.= "transparency,"; $sql.= "fk_element,"; $sql.= "elementtype,"; - $sql.= "entity"; + $sql.= "entity,"; + $sql.= "extraparams"; $sql.= ") VALUES ("; $sql.= "'".$this->db->idate($now)."', "; $sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").", "; $sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").", "; $sql.= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '')?"'".$this->db->escape($this->durationp)."'":"null").", "; // deprecated $sql.= (isset($this->type_id)?$this->type_id:"null").","; - $sql.= (isset($this->type_code)?" '".$this->db->escape($this->type_code)."'":"null").", "; + $sql.= ($code?("'".$code."'"):"null").", "; $sql.= ((isset($this->socid) && $this->socid > 0) ? $this->socid:"null").", "; $sql.= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project:"null").", "; $sql.= " '".$this->db->escape($this->note)."', "; @@ -327,7 +330,8 @@ class ActionComm extends CommonObject $sql.= "'".$this->db->escape($this->transparency)."', "; $sql.= (! empty($this->fk_element)?$this->fk_element:"null").", "; $sql.= (! empty($this->elementtype)?"'".$this->db->escape($this->elementtype)."'":"null").", "; - $sql.= $conf->entity; + $sql.= $conf->entity.","; + $sql.= (! empty($this->extraparams)?"'".$this->db->escape($this->extraparams)."'":"null"); $sql.= ")"; dol_syslog(get_class($this)."::add", LOG_DEBUG); @@ -383,23 +387,15 @@ class ActionComm extends CommonObject { $action='create'; - // Actions on extra fields (by external module or standard code) - // TODO le hook fait double emploi avec le trigger !! - $hookmanager->initHooks(array('actioncommdao')); - $parameters=array('actcomm'=>$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++; - } - } + // Actions on extra fields + 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 && ! $notrigger) @@ -550,7 +546,7 @@ class ActionComm extends CommonObject $sql.= " a.fk_user_author, a.fk_user_mod,"; $sql.= " a.fk_user_action, a.fk_user_done,"; $sql.= " a.fk_contact, a.percent as percentage,"; - $sql.= " a.fk_element, a.elementtype,"; + $sql.= " a.fk_element as elementid, a.elementtype,"; $sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,"; $sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,"; $sql.= " s.nom as socname,"; @@ -591,7 +587,6 @@ class ActionComm extends CommonObject $this->label = $obj->label; $this->datep = $this->db->jdate($obj->datep); $this->datef = $this->db->jdate($obj->datep2); -// $this->durationp = $this->durationp; // deprecated $this->datec = $this->db->jdate($obj->datec); $this->datem = $this->db->jdate($obj->datem); @@ -624,7 +619,8 @@ class ActionComm extends CommonObject $this->societe->id = $obj->fk_soc; // deprecated $this->contact->id = $obj->fk_contact; // deprecated - $this->fk_element = $obj->fk_element; + $this->fk_element = $obj->elementid; + $this->elementid = $obj->elementid; $this->elementtype = $obj->elementtype; $this->fetchResources(); @@ -864,23 +860,15 @@ class ActionComm extends CommonObject { $action='update'; - // Actions on extra fields (by external module or standard code) - // TODO le hook fait double emploi avec le trigger !! - $hookmanager->initHooks(array('actioncommdao')); - $parameters=array('actcomm'=>$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++; - } - } + // Actions on extra fields + 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++; // Now insert assignedusers if (! $error) @@ -1217,15 +1205,16 @@ class ActionComm extends CommonObject * Return URL of event * Use $this->id, $this->type_code, $this->label and $this->type_label * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param int $maxlength Max number of charaters into label. If negative, use the ref as label. - * @param string $classname Force style class on a link - * @param string $option ''=Link to action, 'birthday'=Link to contact - * @param int $overwritepicto 1=Overwrite picto - * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $maxlength Max number of charaters into label. If negative, use the ref as label. + * @param string $classname Force style class on a link + * @param string $option ''=Link to action, 'birthday'=Link to contact + * @param int $overwritepicto 1=Overwrite picto + * @param int $notooltip 1=Disable tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0, $notooltip=0) + function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1) { global $conf, $langs, $user, $hookmanager, $action; @@ -1271,15 +1260,12 @@ class ActionComm extends CommonObject $linkclose.=' title="'.dol_escape_htmltag($tooltip, 1).'"'; $linkclose.=' class="'.$classname.' classfortooltip"'; - if (! is_object($hookmanager)) - { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($this->db); - } + /* $hookmanager->initHooks(array('actiondao')); $parameters=array('id'=>$this->id); $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose); + */ } else $linkclose.=' class="'.$classname.'"'; @@ -1288,6 +1274,13 @@ class ActionComm extends CommonObject $url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id; else $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id; + if ($option !== 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } $linkstart = ''; @@ -1325,6 +1318,13 @@ class ActionComm extends CommonObject $result.=$libelleshort; $result.=$linkend; + global $action; + $hookmanager->initHooks(array('actiondao')); + $parameters=array('id'=>$this->id, 'getnomurl'=>$result); + $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $result = $hookmanager->resPrint; + else $result .= $hookmanager->resPrint; + return $result; } @@ -1640,7 +1640,8 @@ class ActionComm extends CommonObject { global $conf, $langs; - $this->output = ''; + $error = 0; + $this->output = ''; $this->error=''; if (empty($conf->global->AGENDA_REMINDER_EMAIL)) @@ -1654,6 +1655,8 @@ class ActionComm extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); + $this->db->begin(); + // TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done @@ -1662,7 +1665,9 @@ class ActionComm extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'"; $this->db->query($sql); - return 0; + $this->db->commit(); + + return $error; } } diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 58deec46f5e..f5d9c7db762 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -80,6 +80,8 @@ class AgendaEvents extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $result = $this->actioncomm->fetch_optionals(); + $this->actioncomm->fetchObjectLinked(); return $this->_cleanObjectDatas($this->actioncomm); } @@ -113,13 +115,17 @@ class AgendaEvents extends DolibarrApi // If the internal user must only see his customers, force searching by him $search_sale = 0; if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id; + if (empty($conf->societe->enabled)) $search_sale = 0; // If module thirdparty not enabled, sale representative is something that does not exists $sql = "SELECT t.id as rowid"; - if ((!DolibarrApiAccess::$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) + if (! empty($conf->societe->enabled)) + if ((!DolibarrApiAccess::$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) $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as t"; - if ((!DolibarrApiAccess::$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 + if (! empty($conf->societe->enabled)) + if ((!DolibarrApiAccess::$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 t.entity IN ('.getEntity('agenda').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; + if (! empty($conf->societe->enabled)) + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; if ($user_ids) $sql.=" AND t.fk_user_action IN (".$user_ids.")"; if ($socid > 0) $sql.= " AND t.fk_soc = ".$socid; // Insert sale filter @@ -181,7 +187,7 @@ class AgendaEvents extends DolibarrApi * @param array $request_data Request data * @return int ID of Agenda Event */ - function post($request_data = NULL) + function post($request_data = null) { if (! DolibarrApiAccess::$user->rights->agenda->myactions->create) { throw new RestException(401, "Insuffisant rights to create your Agenda Event"); @@ -220,7 +226,7 @@ class AgendaEvents extends DolibarrApi * @return int */ /* - function put($id, $request_data = NULL) { + function put($id, $request_data = null) { if (! DolibarrApiAccess::$user->rights->agenda->myactions->create) { throw new RestException(401, "Insuffisant rights to create your Agenda Event"); } @@ -319,7 +325,6 @@ class AgendaEvents extends DolibarrApi unset($object->usermod); unset($object->libelle); - unset($object->array_options); unset($object->context); unset($object->canvas); unset($object->contact); diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 1bbe5ddc6fc..43e5b89f115 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -36,10 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->load("companies"); -$langs->load("commercial"); -$langs->load("other"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'commercial', 'other', 'bills')); $id = GETPOST('id', 'int'); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 9fae2dd47a9..79b9d30d948 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS @@ -44,7 +44,7 @@ if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MA if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5; $MAXAGENDA=$conf->global->AGENDA_EXT_NB; -$filter = GETPOST("filter",'',3); +$filter = GETPOST("filter",'alpha',3); $filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; @@ -59,7 +59,7 @@ $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page","int"); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="a.datec"; @@ -85,8 +85,8 @@ $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"):0; $pid=GETPOST("projectid","int",3); -$status=GETPOST("status"); -$type=GETPOST("type"); +$status=GETPOST("status",'aZ09'); // status may be 0, 50, 100, 'todo' +$type=GETPOST("type",'az09'); $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')) @@ -102,7 +102,10 @@ if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->glob 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 ($action == 'default') +{ + $action = ((! empty($conf->global->AGENDA_DEFAULT_VIEW) && $conf->global->AGENDA_DEFAULT_VIEW!='show_list') ? $conf->global->AGENDA_DEFAULT_VIEW : 'show_month'); +} if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') { $action='show_month'; $day=''; } // View by month @@ -113,10 +116,8 @@ if (GETPOST('viewday') || $action == 'show_day') { $action='show_day'; $day=($day?$day:date("d")); } // View by day - -$langs->load("agenda"); -$langs->load("other"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array('agenda', 'other', 'commercial')); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agenda')); @@ -126,7 +127,7 @@ $hookmanager->initHooks(array('agenda')); * Actions */ -if (GETPOST("viewlist") || $action == 'show_list') +if (GETPOST("viewlist",'alpha') || $action == 'show_list') { $param=''; if (is_array($_POST)) @@ -142,7 +143,7 @@ if (GETPOST("viewlist") || $action == 'show_list') exit; } -if (GETPOST("viewperuser") || $action == 'show_peruser') +if (GETPOST("viewperuser",'alpha') || $action == 'show_peruser') { $param=''; if (is_array($_POST)) @@ -541,8 +542,8 @@ 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)."'))"; } +if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; } +if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) { @@ -677,7 +678,7 @@ if ($showbirthday) $sql = 'SELECT sp.rowid, sp.lastname, sp.firstname, sp.birthday'; $sql.= ' FROM '.MAIN_DB_PREFIX.'socpeople as sp'; $sql.= ' WHERE (priv=0 OR (priv=1 AND fk_user_creat='.$user->id.'))'; - $sql.= " AND sp.entity IN (".getEntity('societe').")"; + $sql.= " AND sp.entity IN (".getEntity('socpeople').")"; if ($action == 'show_day') { $sql.= ' AND MONTH(birthday) = '.$month; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 9bcf1d2b9cd..9a043a13690 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -33,6 +33,7 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; } +// Load translation files required by the page $langs->load("commercial"); $id = GETPOST('id','int'); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 6f938f3d6bd..2c11a1de977 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -25,26 +25,28 @@ * \brief Page to list actions */ +if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("users"); -$langs->load("companies"); -$langs->load("agenda"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array("users","companies","agenda","commercial")); $action=GETPOST('action','alpha'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'actioncommlist'; // To manage different context of search $resourceid=GETPOST("resourceid","int"); $year=GETPOST("year",'int'); $month=GETPOST("month",'int'); $day=GETPOST("day",'int'); $pid=GETPOST("projectid",'int',3); $status=GETPOST("status",'alpha'); -$type=GETPOST('type'); +$type=GETPOST('type','alphanohtml'); $optioncss = GETPOST('optioncss','alpha'); // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('actioncode','array')) @@ -57,6 +59,7 @@ 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); +$search_id=GETPOST('search_id','alpha'); $search_title=GETPOST('search_title','alpha'); $dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth','int'), GETPOST('dateselectday','int'), GETPOST('dateselectyear','int')); @@ -65,13 +68,11 @@ $dateend=dol_mktime(0, 0, 0, GETPOST('dateendmonth','int'), GETPOST('dateendday' 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); -$filter = GETPOST("filter",'',3); +$filter = GETPOST("filter",'alpha',3); $filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; -$contextpage='actioncommlist'; - $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extralabels = $extrafields->fetch_name_optionals_label('actioncomm'); @@ -116,6 +117,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new ActionComm($db); $hookmanager->initHooks(array('agendalist')); $arrayfields=array( @@ -170,7 +172,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers { //$actioncode=''; - $search_title=''; + $search_id=''; + $search_title=''; $datestart=''; $dateend=''; $status=''; @@ -199,24 +202,25 @@ llxHeader('',$langs->trans("Agenda"),$help_url); $listofextcals=array(); $param=''; -if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($actioncode != '') { if(is_array($actioncode)) { - foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action; - } else $param.="&actioncode=".$actioncode; + foreach($actioncode as $str_action) $param.="&actioncode[]=".urlencode($str_action); + } else $param.="&actioncode=".urlencode($actioncode); } -if ($resourceid > 0) $param.="&resourceid=".$resourceid; -if ($status != '' && $status > -1) $param.="&status=".$status; -if ($filter) $param.="&filter=".$filter; -if ($filtert) $param.="&filtert=".$filtert; -if ($socid) $param.="&socid=".$socid; +if ($resourceid > 0) $param.="&resourceid=".urlencode($resourceid); +if ($status != '' && $status > -1) $param.="&status=".urlencode($status); +if ($filter) $param.="&filter=".urlencode($filter); +if ($filtert) $param.="&filtert=".urlencode($filtert); +if ($socid) $param.="&socid=".urlencode($socid); 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; -if ($search_title != '') $param.='&search_title='.$search_title; +if ($pid) $param.="&projectid=".urlencode($pid); +if ($type) $param.="&type=".urlencode($type); +if ($usergroup) $param.="&usergroup=".urlencode($usergroup); +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +if ($search_id != '') $param.='&search_title='.urlencode($search_id); +if ($search_title != '') $param.='&search_title='.urlencode($search_title); if (GETPOST('datestartday','int')) $param.='&datestartday='.GETPOST('datestartday','int'); if (GETPOST('datestartmonth','int')) $param.='&datestartmonth='.GETPOST('datestartmonth','int'); if (GETPOST('datestartyear','int')) $param.='&datestartyear='.GETPOST('datestartyear','int'); @@ -234,7 +238,7 @@ $sql.= ' a.fk_user_author,a.fk_user_action,'; $sql.= " a.fk_contact, a.note, a.percent as percent,"; $sql.= " a.fk_element, a.elementtype,"; $sql.= " c.code as type_code, c.libelle as type_label,"; -$sql.= " sp.lastname, sp.firstname"; +$sql.= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id"; // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; @@ -291,8 +295,9 @@ 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 == '100') { $sql.= " AND a.percent = 100"; } -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)."'))"; } +if ($status == 'done') { $sql.= " AND (a.percent = 100)"; } +if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } +if ($search_id) $sql.=natural_search("a.id", $search_id, 1); if ($search_title) $sql.=natural_search("a.label", $search_title); // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) @@ -317,6 +322,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1, $offset); @@ -354,7 +364,7 @@ if ($resql) //if ($actioncode) $nav.=''; //if ($resourceid) $nav.=''; if ($filter) $nav.=''; - if ($filtert) $nav.=''; + //if ($filtert) $nav.=''; //if ($socid) $nav.=''; if ($showbirthday) $nav.=''; //if ($pid) $nav.=''; @@ -396,6 +406,7 @@ if ($resql) $s = $hookmanager->resPrint; } + $newcardbutton=''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $tmpforcreatebutton=dol_getdate(dol_now(), true); @@ -404,12 +415,12 @@ if ($resql) //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; - $link = ''; - $link.= $langs->trans("AddAction"); - $link.= ''; + $newcardbutton = ''.$langs->trans("AddAction").''; + $newcardbutton.= ''; + $newcardbutton.= ''; } - print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$link, '', $limit); + print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit); $moreforfilter=''; @@ -421,7 +432,7 @@ if ($resql) print ''."\n"; print ''; - if (! empty($arrayfields['a.id']['checked'])) print ''; + if (! empty($arrayfields['a.id']['checked'])) print ''; if (! empty($arrayfields['owner']['checked'])) print ''; if (! empty($arrayfields['c.libelle']['checked'])) print ''; if (! empty($arrayfields['a.label']['checked'])) print ''; @@ -492,7 +503,6 @@ if ($resql) $caction=new CActionComm($db); $arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), '', 1); - $var=true; while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); @@ -602,9 +612,14 @@ if ($resql) print '
'; if ($obj->fk_contact > 0) { + $contactstatic->id=$obj->fk_contact; + $contactstatic->email=$obj->email; $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; + $contactstatic->phone_pro=$obj->phone_pro; + $contactstatic->phone_mobile=$obj->phone_mobile; + $contactstatic->phone_perso=$obj->phone_perso; + $contactstatic->country_id=$obj->country_id; print $contactstatic->getNomUrl(1,'',28); } else @@ -617,6 +632,7 @@ if ($resql) // Linked object if (! empty($arrayfields['a.fk_element']['checked'])) { print ''; + //var_dump($obj->fkelement.' '.$obj->elementtype); if ($obj->fk_element > 0 && ! empty($obj->elementtype)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print dolGetElementUrl($obj->fk_element,$obj->elementtype,1); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index cc3688a4793..2fdfa180319 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -136,11 +136,8 @@ if (GETPOST('viewyear','alpha') || $action == 'show_year') { $action='show_year'; } // View by year - -$langs->load("users"); -$langs->load("agenda"); -$langs->load("other"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array('users', 'agenda', 'other', 'commercial')); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agenda')); @@ -427,8 +424,8 @@ 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)."'))"; } +if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; } +if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) { @@ -468,10 +465,8 @@ if ($resql) $event->datef=$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->priority=$obj->priority; @@ -483,8 +478,6 @@ if ($resql) $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; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index a4154f5a9e4..0cf056ef3a9 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -136,11 +136,8 @@ if (GETPOST('viewday','alpha') || $action == 'show_day') { $action='show_day'; $day=($day?$day:date("d")); } // View by day - -$langs->load("users"); -$langs->load("agenda"); -$langs->load("other"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array('users', 'agenda', 'other', 'commercial')); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agenda')); @@ -205,24 +202,24 @@ if ($status == 'todo') $title=$langs->trans("ToDoActions"); $param=''; if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) { if(is_array($actioncode)) { - foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action; - } else $param.="&actioncode=".$actioncode; + foreach($actioncode as $str_action) $param.="&actioncode[]=".urlencode($str_action); + } else $param.="&actioncode=".urlencode($actioncode); } -if ($resourceid > 0) $param.="&resourceid=".$resourceid; -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 ($resourceid > 0) $param.="&resourceid=".urlencode($resourceid); +if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".urlencode($status); +if ($filter) $param.="&filter=".urlencode($filter); +if ($filtert) $param.="&filtert=".urlencode($filtert); +if ($usergroup) $param.="&usergroup=".urlencode($usergroup); +if ($socid) $param.="&socid=".urlencode($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') $param.='&action='.$action; -if ($begin_h != '') $param.='&begin_h='.$begin_h; -if ($end_h != '') $param.='&end_h='.$end_h; -if ($begin_d != '') $param.='&begin_d='.$begin_d; -if ($end_d != '') $param.='&end_d='.$end_d; -$param.="&maxprint=".$maxprint; +if ($pid) $param.="&projectid=".urlencode($pid); +if ($type) $param.="&type=".urlencode($type); +if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser') $param.='&action='.urlencode($action); +if ($begin_h != '') $param.='&begin_h='.urlencode($begin_h); +if ($end_h != '') $param.='&end_h='.urlencode($end_h); +if ($begin_d != '') $param.='&begin_d='.urlencode($begin_d); +if ($end_d != '') $param.='&end_d='.urlencode($end_d); +$param.="&maxprint=".urlencode($maxprint); $prev = dol_get_first_day_week($day, $month, $year); @@ -245,7 +242,9 @@ $next_day = $next['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'); + +$nb_weeks_to_show = (! empty($conf->global->AGENDA_NB_WEEKS_IN_VIEW_PER_USER)) ? ((int) $conf->global->AGENDA_NB_WEEKS_IN_VIEW_PER_USER * 7) : 7; +$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, $nb_weeks_to_show, 'd'); //print $firstday.'-'.$first_month.'-'.$first_year; //print dol_print_date($firstdaytoshow,'dayhour'); //print dol_print_date($lastdaytoshow,'dayhour'); @@ -282,12 +281,11 @@ $nav.=' idate($now)."'))"; } -if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; } +if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; } +if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) { @@ -465,7 +463,7 @@ if ($filtert > 0 || $usergroup > 0) } // Sort on date $sql.= ' ORDER BY fk_user_action, datep'; //fk_user_action -//print $sql;exit; + dol_syslog("comm/action/peruser.php", LOG_DEBUG); $resql=$db->query($sql); @@ -495,10 +493,8 @@ if ($resql) $event->datef=$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->priority=$obj->priority; @@ -510,8 +506,6 @@ if ($resql) $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; @@ -619,183 +613,193 @@ echo '' ; //print "begin_d=".$begin_d." end_d=".$end_d; - +$currentdaytoshow = $firstdaytoshow; echo '
'; -echo ''; -echo ''; -echo ''; -$i=0; // 0 = sunday, -while ($i < 7) -{ - if (($i + 1) < $begin_d || ($i + 1) > $end_d) - { - $i++; - continue; - } - echo '\n"; - $i++; -} -echo "\n"; +while($currentdaytoshow<$lastdaytoshow) { -echo ''; -echo ''; -$i=0; -while ($i < 7) -{ - if (($i + 1) < $begin_d || ($i + 1) > $end_d) - { - $i++; - continue; - } - for ($h = $begin_h; $h < $end_h; $h++) - { - echo '"; - } - echo "\n"; - $i++; -} -echo "\n"; + echo '
'; - echo $langs->trans("Day".(($i+(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1)) % 7)); - print "
"; - if ($i) print dol_print_date(dol_time_plus_duree($firstdaytoshow, $i, 'd'),'day'); - else print dol_print_date($firstdaytoshow,'day'); - echo "
'; - print ''.sprintf("%02d",$h).''; - print "
'; - -// Define $usernames -$usernames = array(); //init -$usernamesid = array(); -/* Use this to have list of users only if users have events */ -if (! empty($conf->global->AGENDA_SHOWOWNERONLY_ONPERUSERVIEW)) -{ - foreach ($eventarray as $daykey => $notused) - { - // Get all assigned users for each event - foreach ($eventarray[$daykey] as $index => $event) - { - $event->fetch_userassigned(); - $listofuserid=$event->userassigned; - foreach($listofuserid as $userid => $tmp) - { - if (! in_array($userid, $usernamesid)) $usernamesid[$userid] = $userid; - } - } - } -} -/* Use this list to have for all users */ -else -{ - $sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity"; - $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; - if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user"; - $sql.= " WHERE u.statut = 1 AND u.entity IN (".getEntity('user').")"; - if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup; - //print $sql; - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - if ($num) - { - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $usernamesid[$obj->rowid]=$obj->rowid; - $i++; - } - } - } - else dol_print_error($db); -} -//var_dump($usernamesid); -foreach($usernamesid as $id) -{ - $tmpuser=new User($db); - $result=$tmpuser->fetch($id); - $usernames[]=$tmpuser; -} - -/* -if ($filtert > 0) -{ - $tmpuser = new User($db); - $tmpuser->fetch($filtert); - $usernames[] = $tmpuser; -} -else if ($usergroup) -{ - $tmpgroup = new UserGroup($db); - $tmpgroup->fetch($usergroup); - $usernames = $tmpgroup->listUsersForGroup(); -} -else -{ - $tmpgroup = new UserGroup($db); - //$tmpgroup->fetch($usergroup); No fetch, we want all users for all groups - $usernames = $tmpgroup->listUsersForGroup(); -}*/ - -// Load array of colors by type -$colorsbytype=array(); -$labelbytype=array(); -$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; -$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 ($usernames as $username) -{ - $var = ! $var; - echo ""; - echo ''; - $tmpday = $sav; - - // Lopp on each day of week - $i = 0; - for ($iter_day = 0; $iter_day < 8; $iter_day++) + echo ''; + echo ''; + $i=0; // 0 = sunday, + while ($i < 7) { 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); - + echo '\n"; $i++; } echo "\n"; - $showheader = false; + + echo ''; + echo ''; + $i=0; + while ($i < 7) + { + if (($i + 1) < $begin_d || ($i + 1) > $end_d) + { + $i++; + continue; + } + for ($h = $begin_h; $h < $end_h; $h++) + { + echo '"; + } + echo "\n"; + $i++; + } + echo "\n"; + + + // Define $usernames + $usernames = array(); //init + $usernamesid = array(); + /* Use this to have list of users only if users have events */ + if (! empty($conf->global->AGENDA_SHOWOWNERONLY_ONPERUSERVIEW)) + { + foreach ($eventarray as $daykey => $notused) + { + // Get all assigned users for each event + foreach ($eventarray[$daykey] as $index => $event) + { + $event->fetch_userassigned(); + $listofuserid=$event->userassigned; + foreach($listofuserid as $userid => $tmp) + { + if (! in_array($userid, $usernamesid)) $usernamesid[$userid] = $userid; + } + } + } + } + /* Use this list to have for all users */ + else + { + $sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity"; + $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; + if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user"; + $sql.= " WHERE u.statut = 1 AND u.entity IN (".getEntity('user').")"; + if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup; + //print $sql; + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + if ($num) + { + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $usernamesid[$obj->rowid]=$obj->rowid; + $i++; + } + } + } + else dol_print_error($db); + } + //var_dump($usernamesid); + foreach($usernamesid as $id) + { + $tmpuser=new User($db); + $result=$tmpuser->fetch($id); + $usernames[]=$tmpuser; + } + + /* + if ($filtert > 0) + { + $tmpuser = new User($db); + $tmpuser->fetch($filtert); + $usernames[] = $tmpuser; + } + else if ($usergroup) + { + $tmpgroup = new UserGroup($db); + $tmpgroup->fetch($usergroup); + $usernames = $tmpgroup->listUsersForGroup(); + } + else + { + $tmpgroup = new UserGroup($db); + //$tmpgroup->fetch($usergroup); No fetch, we want all users for all groups + $usernames = $tmpgroup->listUsersForGroup(); + }*/ + + // Load array of colors by type + $colorsbytype=array(); + $labelbytype=array(); + $sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; + $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 ($usernames as $username) + { + $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($currentdaytoshow, $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 "
'; - print $username->getNomUrl(-1,'',0,0,20,1,''); - print '
'; + echo $langs->trans("Day".(($i+(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1)) % 7)); + print "
"; + if ($i) print dol_print_date(dol_time_plus_duree($currentdaytoshow, $i, 'd'),'day'); + else print dol_print_date($currentdaytoshow,'day'); + echo "
'; + print ''.sprintf("%02d",$h).''; + print "
'; + print $username->getNomUrl(-1,'',0,0,20,1,''); + print '
\n"; + echo "
"; + + $currentdaytoshow = dol_time_plus_duree($currentdaytoshow, 7, 'd'); + } -echo "
\n"; echo ''; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! empty($conf->global->AGENDA_USE_COLOR_PER_EVENT_TYPE)) diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 2d72fa4c3f8..7e4108b470b 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -31,14 +31,14 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php'; -$langs->load("agenda"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array("agenda", "commercial")); $action=GETPOST('action','alpha'); $month=GETPOST('month'); $year=GETPOST('year'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -93,6 +93,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1,$offset); @@ -133,7 +138,6 @@ if ($resql) print '
'.$langs->trans("Size").'
'.$langs->trans('VATIsUsed').''; + print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling')); + print ''; print yn($object->tva_assuj); print '
'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; - print yn($object->localtax1_assuj); - print '
'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; + print yn($object->localtax1_assuj); + print '
'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; + print yn($object->localtax2_assuj); + print '
'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; - print yn($object->localtax2_assuj); - print '
'.$langs->trans('VATIntra').''; @@ -427,7 +436,7 @@ if ($object->id > 0) // Multiprice level - if (! empty($conf->global->PRODUIT_MULTIPRICES)) + if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { print '
'; print ''; print ''; } + $i = 0; while ($i < $num && $i < $MAXLIST) { - $contrat=new Contrat($db); - $objp = $db->fetch_object($resql); + $contrat->id=$objp->id; + $contrat->ref=$objp->ref?$objp->ref:$objp->id; + $contrat->ref_customer=$objp->refcus; + $contrat->ref_supplier=$objp->refsup; + print ''; print '\n"; print '\n"; @@ -935,12 +947,11 @@ if ($object->id > 0) $sql.= " AND f.entity = ".$conf->entity; $sql.= " ORDER BY f.tms DESC"; - $fichinter_static=new Fichinter($db); - $resql=$db->query($sql); if ($resql) { - $var=true; + $fichinter_static=new Fichinter($db); + $num = $db->num_rows($resql); if ($num > 0) { @@ -951,8 +962,8 @@ if ($object->id > 0) print ''; print '
'; @@ -651,8 +660,6 @@ if ($object->id > 0) */ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { - $propal_static = new Propal($db); - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht"; $sql.= ", p.tva as total_tva"; $sql.= ", p.total as total_ttc"; @@ -667,9 +674,9 @@ if ($object->id > 0) $resql=$db->query($sql); if ($resql) { - $var=true; - $num = $db->num_rows($resql); + $propal_static = new Propal($db); + $num = $db->num_rows($resql); if ($num > 0) { print ''; @@ -718,8 +725,6 @@ if ($object->id > 0) */ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { - $commande_static=new Commande($db); - $sql = "SELECT s.nom, s.rowid"; $sql.= ", c.rowid as cid, c.total_ht"; $sql.= ", c.tva as total_tva"; @@ -735,14 +740,14 @@ if ($object->id > 0) $resql=$db->query($sql); if ($resql) { - $var=true; - $num = $db->num_rows($resql); + $commande_static=new Commande($db); + $num = $db->num_rows($resql); if ($num > 0) { // Check if there are orders billable $sql2 = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,'; - $sql2.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee'; + $sql2.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as billed'; $sql2.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql2.= ', '.MAIN_DB_PREFIX.'commande as c'; $sql2.= ' WHERE c.fk_soc = s.rowid'; @@ -770,14 +775,16 @@ if ($object->id > 0) { $objp = $db->fetch_object($resql); + $commande_static->id = $objp->cid; + $commande_static->ref = $objp->ref; + $commande_static->ref_client=$objp->ref_client; + $commande_static->total_ht = $objp->total_ht; + $commande_static->total_tva = $objp->total_tva; + $commande_static->total_ttc = $objp->total_ttc; + $commande_static->billed = $objp->billed; + print ''; print '\n"; print ''; @@ -797,9 +804,8 @@ if ($object->id > 0) /* * Last shipments */ - if (! empty($conf->expedition->enabled) && $user->rights->expedition->lire) { - $sendingstatic = new Expedition($db); - + if (! empty($conf->expedition->enabled) && $user->rights->expedition->lire) + { $sql = 'SELECT e.rowid as id'; $sql.= ', e.ref'; $sql.= ', e.date_creation'; @@ -818,10 +824,11 @@ if ($object->id > 0) $sql.= " ORDER BY e.date_creation DESC"; $resql = $db->query($sql); - if ($resql) { - $var = true; - $num = $db->num_rows($resql); - $i = 0; + if ($resql) + { + $sendingstatic = new Expedition($db); + + $num = $db->num_rows($resql); if ($num > 0) { print '
'; - $commande_static->id = $objp->cid; - $commande_static->ref = $objp->ref; - $commande_static->ref_client=$objp->ref_client; - $commande_static->total_ht = $objp->total_ht; - $commande_static->total_tva = $objp->total_tva; - $commande_static->total_ttc = $objp->total_ttc; print $commande_static->getNomUrl(1); print ''.dol_print_date($db->jdate($objp->dc),'day')."'.price($objp->total_ht).'
'; @@ -832,12 +839,16 @@ if ($object->id > 0) print ''; } - while ($i < $num && $i < $MAXLIST) { + $i = 0; + while ($i < $num && $i < $MAXLIST) + { $objp = $db->fetch_object($resql); - print ''; - print ''; + print ''; if ($objp->date_creation > 0) { @@ -864,9 +875,7 @@ if ($object->id > 0) */ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { - $contratstatic=new Contrat($db); - - $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 = "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_customer as refcus, 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; @@ -876,9 +885,10 @@ if ($object->id > 0) $resql=$db->query($sql); if ($resql) { - $var=true; + $contrat=new Contrat($db); + $num = $db->num_rows($resql); - if ($num >0 ) + if ($num >0) { print '
'; + $sendingstatic->id = $objp->id; $sendingstatic->ref = $objp->ref; + + print '
'; print $sendingstatic->getNomUrl(1); print '
'; @@ -889,17 +899,19 @@ if ($object->id > 0) print '
'; - $contrat->id=$objp->id; - $contrat->ref=$objp->ref?$objp->ref:$objp->id; print $contrat->getNomUrl(1,12); print "'.dol_trunc($objp->refsup,12)."'.img_picto($langs->trans("Statistics"),'stats').'
'; @@ -1022,12 +1031,11 @@ if ($object->id > 0) print ''; } + $i = 0; while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - print ''; - print ''; + print ''; if ($objp->frequency && $objp->date_last_gen > 0) @@ -1086,8 +1097,6 @@ if ($object->id > 0) */ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - $facturestatic = new Facture($db); - $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.amount'; $sql.= ', f.total as total_ht'; $sql.= ', f.tva as total_tva'; @@ -1107,9 +1116,9 @@ if ($object->id > 0) $resql=$db->query($sql); if ($resql) { - $var=true; + $facturestatic = new Facture($db); + $num = $db->num_rows($resql); - $i = 0; if ($num > 0) { print '
'; $invoicetemplate->id = $objp->id; $invoicetemplate->ref = $objp->ref; $invoicetemplate->suspended = $objp->suspended; @@ -1036,6 +1044,9 @@ if ($object->id > 0) $invoicetemplate->total_ht = $objp->total_ht; $invoicetemplate->total_tva = $objp->total_tva; $invoicetemplate->total_ttc = $objp->total_ttc; + + print '
'; print $invoicetemplate->getNomUrl(1); print '
'; @@ -1121,18 +1130,20 @@ if ($object->id > 0) print ''; } + $i = 0; while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - print ''; - print ''; + print ''; if ($objp->df > 0) diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 5c160bfab16..aa8dae43140 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -26,6 +26,7 @@ require '../main.inc.php'; +// Load translation files required by the page $langs->load("companies"); $sortfield=GETPOST('sortfield', 'alpha'); @@ -34,7 +35,7 @@ $page=GETPOST('page', 'int'); if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="p.name"; if ($page < 0) { $page = 0; } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; $type=GETPOST('type', 'alpha'); @@ -78,7 +79,7 @@ if (! $user->rights->societe->client->voir && ! $socid) $sql .= " ".MAIN_DB_PREF $sql.= " ".MAIN_DB_PREFIX."socpeople as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; $sql.= " WHERE s.fk_stcomm = st.id"; -$sql.= " AND p.entity IN (".getEntity('societe').")"; +$sql.= " AND p.entity IN (".getEntity('socpeople').")"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($type == "c") $sql.= " AND s.client IN (1, 3)"; if ($type == "p") $sql.= " AND s.client IN (2, 3)"; @@ -144,14 +145,11 @@ if ($resql) print ''; print "\n"; - $var=True; $i = 0; while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - - print ''; print ''; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index bdf92b31905..e90a821b5e3 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -37,8 +37,8 @@ if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn if (! $user->rights->societe->lire) accessforbidden(); -$langs->load("commercial"); -$langs->load("propal"); +// Load translation files required by the page +$langs->loadLangs(array("commercial", "propal")); $action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); @@ -161,7 +161,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''; - $var=true; if ($num > 0) { $i = 0; @@ -228,7 +227,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos 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').")"; + $sql.= " AND p.entity IN (".getEntity('supplier_proposal').")"; 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; @@ -243,7 +242,6 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos print ''; print ''; - $var=true; if ($num > 0) { $i = 0; @@ -266,7 +264,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos $companystatic->code_client = $obj->code_client; $companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->canvas=$obj->canvas; - print $companystatic->getNomUrl(1,'customer',16); + print $companystatic->getNomUrl(1,'supplier',16); print ''; print ''; $i++; @@ -274,13 +272,11 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos } if ($total>0) { - print '"; } } else { - print ''; } print "
'; $facturestatic->id = $objp->facid; $facturestatic->ref = $objp->facnumber; $facturestatic->type = $objp->type; - $facturestatic->total_ht = $objp->total_ht; - $facturestatic->total_tva = $objp->total_tva; - $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + + print '
'; print $facturestatic->getNomUrl(1); print '
'.img_object($langs->trans("ShowContact"),"contact"); print ' '.$obj->name.'
'.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').'
'.$langs->trans("SupplierProposalsDraft").($num?' '.$num.'':'').'
'.price($obj->total_ht).'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoProposal").'

"; @@ -323,7 +319,6 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print '
'.$langs->trans("DraftOrders").($num?' '.$num.'':'').'
'.price($obj->total_ttc).'
'.price($obj->total_ht).'
'.price($obj->total_ttc).'
'.$langs->trans("DraftSuppliersOrders").($num?' '.$num.'':'').'
'.price($obj->total_ttc).'
'.price($obj->total_ht).'
'.price($obj->total_ttc).'
'; print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ttc).''.price($obj->total_ht).''.price($obj->total_ttc).''.$propalstatic->LibStatut($obj->fk_statut,3).'
'; print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ttc).''.price($obj->total_ht).''.price($obj->total_ttc).''.$orderstatic->LibStatut($obj->fk_statut,$obj->billed,3).'
'; @@ -62,7 +61,7 @@ print '
'; print '
'; print ''; - + print "
'; print $langs->trans("Other").':

\n"; //} @@ -74,7 +73,6 @@ print '
'.$langs->trans("TargetsStatistic $dir=DOL_DOCUMENT_ROOT."/core/modules/mailings"; $handle=opendir($dir); -$var=True; if (is_resource($handle)) { while (($file = readdir($handle))!==false) @@ -106,8 +104,6 @@ if (is_resource($handle)) // Si le module mailing est qualifi� if ($qualified) { - $var = !$var; - foreach ($mailmodule->getSqlArrayForStats() as $sql) { print '
'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'
'."\n"; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index dd4e6cef1fa..1e8c5c82cf4 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -27,8 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -$langs->load("orders"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'companies')); $id = GETPOST('id','int'); $_socid = GETPOST("id",'int'); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 739368e96d3..817115d93af 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -56,14 +56,8 @@ if (!empty($conf->variants->enabled)) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } -$langs->load('companies'); -$langs->load('propal'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load('orders'); -$langs->load('products'); -$langs->load("deliveries"); -$langs->load('sendings'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings')); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); @@ -616,7 +610,7 @@ if (empty($reshook)) // Close proposal else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel','alpha')) { - if (! GETPOST('statut','int')) { + if (! (GETPOST('statut','int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'statut'; } else { @@ -848,7 +842,28 @@ if (empty($reshook)) // If price per quantity and customer elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - // TODO Same than PRODUIT_CUSTOMER_PRICES_BY_QTY but using $object->thirdparty->price_level + if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity + { + // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. + $pqp = GETPOST('pbq','int'); + + // Search price into product_price_by_qty from $prod->id + foreach($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) + { + if ($priceforthequantityarray['rowid'] != $pqp) continue; + // We found the price + if ($priceforthequantityarray['price_base_type'] == 'HT') + { + $pu_ht = $priceforthequantityarray['unitprice']; + } + else + { + $pu_ttc = $priceforthequantityarray['unitprice']; + } + // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. + break; + } + } } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); @@ -1371,7 +1386,7 @@ if ($action == 'create') $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)); + $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:0)); // TODO maybe add default value option $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)); @@ -1458,17 +1473,13 @@ if ($action == 'create') // Ligne info remises tiers print ''; } @@ -1749,11 +1760,12 @@ if ($action == 'create') { //Form to close proposal (signed or not) $formquestion = array( - array('type' => 'select','name' => 'statut','label' => $langs->trans("CloseAs"),'values' => array(2=>$object->labelstatut [2],3=>$object->labelstatut [3])), - array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"),'value' => '') // Field to complete private note (not replace) + array('type' => 'select','name' => 'statut','label' => $langs->trans("CloseAs"),'values' => array(2=>$object->LibStatut(Propal::STATUS_SIGNED), 3=>$object->LibStatut(Propal::STATUS_NOTSIGNED))), + array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"),'value' => '') // Field to complete private note (not replace) ); - if (! empty($conf->notification->enabled)) { + if (! empty($conf->notification->enabled)) + { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); $formquestion = array_merge($formquestion, array( @@ -1828,7 +1840,7 @@ if ($action == 'create') $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' ('.$langs->trans("OtherProposals").')'; // Project if (! empty($conf->projet->enabled)) @@ -1875,31 +1887,26 @@ if ($action == 'create') print '
' . $langs->trans('Discounts') . ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount = $soc->getAvailableDiscounts(); - print '. '; - if ($absolute_discount) - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount, 0, $langs, 1, -1, -1, $conf->currency)); - else - print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print '.'; + + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print '
'; // Link for thirdparty discounts + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } else { + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; + } + print ''; // Date of proposal @@ -2286,7 +2293,7 @@ if ($action == 'create') $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); // Form to add new line - if ($object->statut == Propal::STATUS_DRAFT && $user->rights->propal->creer) + if ($object->statut == Propal::STATUS_DRAFT && $user->rights->propal->creer && $action != 'selectlines') { if ($action != 'editline') { @@ -2348,9 +2355,9 @@ if ($action == 'create') // Send if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->propal->propal_advance->send) { - print ''; + print ''; } else - print ''; + print ''; } // Create an order diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 63b26373f60..39857d88365 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -77,6 +77,9 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + // Add external contacts ids + $this->propal->contacts_ids = $this->propal->liste_contact(-1,'external',1); + $this->propal->fetchObjectLinked(); return $this->_cleanObjectDatas($this->propal); } @@ -156,6 +159,8 @@ class Proposals extends DolibarrApi $obj = $db->fetch_object($result); $proposal_static = new Propal($db); if($proposal_static->fetch($obj->rowid)) { + // Add external contacts ids + $proposal_static->contacts_ids = $proposal_static->liste_contact(-1,'external',1); $obj_ret[] = $this->_cleanObjectDatas($proposal_static); } $i++; @@ -176,7 +181,7 @@ class Proposals extends DolibarrApi * @param array $request_data Request data * @return int ID of proposal */ - function post($request_data = NULL) + function post($request_data = null) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401, "Insuffisant rights"); @@ -241,7 +246,7 @@ class Proposals extends DolibarrApi * * @return int */ - function postLine($id, $request_data = NULL) + function postLine($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); @@ -307,7 +312,7 @@ class Proposals extends DolibarrApi * * @return object */ - function putLine($id, $lineid, $request_data = NULL) + function putLine($id, $lineid, $request_data = null) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); @@ -410,7 +415,7 @@ class Proposals extends DolibarrApi * * @return int */ - function put($id, $request_data = NULL) { + function put($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } @@ -708,7 +713,7 @@ class Proposals extends DolibarrApi $object = parent::_cleanObjectDatas($object); - unset($object->note); + unset($object->note); unset($object->name); unset($object->lastname); unset($object->firstname); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3adc58ecbae..1f6c27a1c05 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -142,9 +142,9 @@ class Propal extends CommonObject public $cond_reglement_code; public $mode_reglement_code; - public $remise; - public $remise_percent; - public $remise_absolue; + public $remise = 0; + public $remise_percent = 0; + public $remise_absolue = 0; public $fk_address; public $address_type; public $address; @@ -198,6 +198,7 @@ class Propal extends CommonObject */ const STATUS_BILLED = 4; // Todo rename into STATUS_CLOSE ? + /** * Constructor * @@ -210,26 +211,13 @@ class Propal extends CommonObject global $conf,$langs; $this->db = $db; + $this->socid = $socid; $this->id = $propalid; + $this->products = array(); - $this->remise = 0; - $this->remise_percent = 0; - $this->remise_absolue = 0; $this->duree_validite=$conf->global->PROPALE_VALIDITY_DURATION; - - $langs->load("propal"); - $this->labelstatut[0]=(! empty($conf->global->PROPAL_STATUS_DRAFT_LABEL) ? $conf->global->PROPAL_STATUS_DRAFT_LABEL : $langs->trans("PropalStatusDraft")); - $this->labelstatut[1]=(! empty($conf->global->PROPAL_STATUS_VALIDATED_LABEL) ? $conf->global->PROPAL_STATUS_VALIDATED_LABEL : $langs->trans("PropalStatusValidated")); - $this->labelstatut[2]=(! empty($conf->global->PROPAL_STATUS_SIGNED_LABEL) ? $conf->global->PROPAL_STATUS_SIGNED_LABEL : $langs->trans("PropalStatusSigned")); - $this->labelstatut[3]=(! empty($conf->global->PROPAL_STATUS_NOTSIGNED_LABEL) ? $conf->global->PROPAL_STATUS_NOTSIGNED_LABEL : $langs->trans("PropalStatusNotSigned")); - $this->labelstatut[4]=(! empty($conf->global->PROPAL_STATUS_BILLED_LABEL) ? $conf->global->PROPAL_STATUS_BILLED_LABEL : $langs->trans("PropalStatusBilled")); - $this->labelstatut_short[0]=(! empty($conf->global->PROPAL_STATUS_DRAFTSHORT_LABEL) ? $conf->global->PROPAL_STATUS_DRAFTSHORT_LABEL : $langs->trans("PropalStatusDraftShort")); - $this->labelstatut_short[1]=(! empty($conf->global->PROPAL_STATUS_VALIDATEDSHORT_LABEL) ? $conf->global->PROPAL_STATUS_VALIDATEDSHORT_LABEL : $langs->trans("Opened")); - $this->labelstatut_short[2]=(! empty($conf->global->PROPAL_STATUS_SIGNEDSHORT_LABEL) ? $conf->global->PROPAL_STATUS_SIGNEDSHORT_LABEL : $langs->trans("PropalStatusSignedShort")); - $this->labelstatut_short[3]=(! empty($conf->global->PROPAL_STATUS_NOTSIGNEDSHORT_LABEL) ? $conf->global->PROPAL_STATUS_NOTSIGNEDSHORT_LABEL : $langs->trans("PropalStatusNotSignedShort")); - $this->labelstatut_short[4]=(! empty($conf->global->PROPAL_STATUS_BILLEDSHORT_LABEL) ? $conf->global->PROPAL_STATUS_BILLEDSHORT_LABEL : $langs->trans("PropalStatusBilledShort")); } @@ -426,6 +414,7 @@ class Propal extends CommonObject $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu_ht=price2num($pu_ht); + $pu_ht_devise=price2num($pu_ht_devise); $pu_ttc=price2num($pu_ttc); $txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' $txlocaltax1=price2num($txlocaltax1); @@ -647,6 +636,7 @@ class Propal extends CommonObject $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu = price2num($pu); + $pu_ht_devise=price2num($pu_ht_devise); $txtva = price2num($txtva); $txlocaltax1=price2num($txlocaltax1); $txlocaltax2=price2num($txlocaltax2); @@ -1114,12 +1104,8 @@ class Propal extends CommonObject { $action='update'; - // Actions on extra fields (by external module or standard code) - // TODO le hook fait double emploi avec le trigger !! - $hookmanager->initHooks(array('propaldao')); - $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)) + // Actions on extra fields + if (! $error) { if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { @@ -1130,9 +1116,8 @@ class Propal extends CommonObject } } } - else if ($reshook < 0) $error++; - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('PROPAL_CREATE',$user); @@ -1343,8 +1328,8 @@ class Propal extends CommonObject $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."propal as p"; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as cp ON p.fk_mode_reglement = cp.id AND cp.entity IN ('.getEntity('c_paiement').')'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON p.fk_cond_reglement = cr.rowid AND cr.entity IN ('.getEntity('c_payment_term').')'; + $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.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON p.fk_availability = ca.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON p.fk_input_reason = dr.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid'; @@ -1658,7 +1643,7 @@ class Propal extends CommonObject $this->db->free($result); - return 1; + return $num; } else { @@ -2528,21 +2513,6 @@ class Propal extends CommonObject } } - /** - * Class invoiced the Propal - * - * @return int <0 si ko, >0 si ok - * @deprecated - * @see classifyBilled() - */ - function classer_facturee() - { - global $user; - dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); - - return $this->classifyBilled($user); - } - /** * Set draft status * @@ -3111,10 +3081,26 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=1) + function LibStatut($statut,$mode=1) { - global $langs; - $langs->load("propal"); + global $conf; + + // Init/load array of translation of status + if (empty($this->labelstatut) || empty($this->labelstatut_short)) + { + global $langs; + $langs->load("propal"); + $this->labelstatut[0]=$langs->trans("PropalStatusDraft"); + $this->labelstatut[1]=$langs->trans("PropalStatusValidated"); + $this->labelstatut[2]=$langs->trans("PropalStatusSigned"); + $this->labelstatut[3]=$langs->trans("PropalStatusNotSigned"); + $this->labelstatut[4]=$langs->trans("PropalStatusBilled"); + $this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort"); + $this->labelstatut_short[1]=$langs->trans("Opened"); + $this->labelstatut_short[2]=$langs->trans("PropalStatusSignedShort"); + $this->labelstatut_short[3]=$langs->trans("PropalStatusNotSignedShort"); + $this->labelstatut_short[4]=$langs->trans("PropalStatusBilledShort"); + } $statuttrans=''; if ($statut==self::STATUS_DRAFT) $statuttrans='statut0'; @@ -3834,6 +3820,8 @@ class PropaleLigne extends CommonObjectLine $this->multicurrency_total_tva = $objp->multicurrency_total_tva; $this->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $this->fetch_optionals(); + $this->db->free($result); return 1; @@ -3968,7 +3956,7 @@ class PropaleLigne extends CommonObjectLine } } - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('LINEPROPAL_INSERT',$user); @@ -4151,7 +4139,7 @@ class PropaleLigne extends CommonObjectLine } } - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('LINEPROPAL_UPDATE',$user); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 01e851769a7..5e21f493c64 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -32,10 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->load("facture"); -$langs->load("orders"); -$langs->load("sendings"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('facture', 'orders', 'sendings', 'companies')); $id=GETPOST('id','int'); $ref= GETPOST('ref','alpha'); @@ -164,7 +162,7 @@ if ($object->id > 0) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 4ceae6b1221..1c8d494214d 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -36,9 +36,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('compta'); -$langs->load('other'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'other', 'companies')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); @@ -114,7 +113,7 @@ if ($object->id > 0) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { @@ -160,7 +159,7 @@ if ($object->id > 0) // Files infos print ''; - print ''; + print ''; print "
' . $langs->trans('Discounts') . ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); - print '. '; - $absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL'); - $absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL'); + + $absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount); + $absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote); $absolute_discount = price2num($absolute_discount, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT'); - if ($absolute_discount) { - if ($object->statut > Propal::STATUS_DRAFT) { - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount, 0, $langs, 0, 0, -1, $conf->currency)); - } else { - // Remise dispo de type non avoir - $filter = 'fk_facture_source IS NULL'; - print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter, 0, '', 1); - } - } - if ($absolute_creditnote) { - print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote, 0, $langs, 0, 0, -1, $conf->currency)) . '. '; - } - if (! $absolute_discount && ! $absolute_creditnote) - print $langs->trans("CompanyHasNoAbsoluteDiscount") . '.'; + + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?id=' . $object->id); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
\n"; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index e9dce10ea0b..0dbe2fb855e 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -27,8 +27,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; -$langs->load("propal"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('propal', 'companies')); // Security check $socid=GETPOST('socid','int'); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 67cc8210402..317c9902d52 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -32,8 +32,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('propal'); -$langs->load('compta'); +// Load translation files required by the page +$langs->loadLangs(array('propal', 'compta')); $id=GETPOST('id','int'); $ref=GETPOST('ref','alpha'); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index cdcd5bf014b..08860bc3c08 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -10,8 +10,9 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2016-2018 Ferran Marcet * Copyright (C) 2017 Charlene Benke + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -43,7 +44,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->loadLangs(array('companies','propal','compta','bills','orders','products')); +// Load translation files required by the page +$langs->loadLangs(array('companies','propal','compta','bills','orders','products','deliveries')); $socid=GETPOST('socid','int'); @@ -52,6 +54,7 @@ $massaction=GETPOST('massaction','alpha'); $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'proposallist'; $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); @@ -74,6 +77,14 @@ $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_day=GETPOST("search_day","int"); $search_month=GETPOST("search_month","int"); $search_year=GETPOST("search_year","int"); +$search_dayfin=GETPOST("search_dayfin","int"); +$search_monthfin=GETPOST("search_monthfin","int"); +$search_yearfin=GETPOST("search_yearfin","int"); +$search_daydelivery=GETPOST("search_daydelivery","int"); +$search_monthdelivery=GETPOST("search_monthdelivery","int"); +$search_yeardelivery=GETPOST("search_yeardelivery","int"); +$search_availability=GETPOST('search_availability','int'); +$search_categ_cus=trim(GETPOST("search_categ_cus",'int')); $viewstatut=GETPOST('viewstatut','alpha'); $optioncss = GETPOST('optioncss','alpha'); @@ -83,7 +94,7 @@ $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alp $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -94,9 +105,6 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='p.ref'; if (! $sortorder) $sortorder='DESC'; -// Initialize technical object to manage context to save list fields -$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'proposallist'; - // Security check $module='propal'; $dbtable=''; @@ -113,6 +121,7 @@ $result = restrictedArea($user, $module, $objectid, $dbtable); $diroutputmassaction=$conf->propal->multidir_output[$conf->entity] . '/temp/massgeneration/'.$user->id; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new Propal($db); $hookmanager->initHooks(array('propallist')); $extrafields = new ExtraFields($db); @@ -144,6 +153,8 @@ $arrayfields=array( 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), 'p.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1), 'p.fin_validite'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1), + 'p.date_livraison'=>array('label'=>$langs->trans("DeliveryDate"), 'checked'=>0), + 'ava.rowid'=>array('label'=>$langs->trans("AvailabilityPeriod"), 'checked'=>0), 'p.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), 'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), 'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), @@ -201,10 +212,19 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $search_year=''; $search_month=''; $search_day=''; + $search_yearfin=''; + $search_monthfin=''; + $search_dayfin=''; + $search_yeardelivery=''; + $search_monthdelivery=''; + $search_daydelivery=''; + $search_availability=''; $viewstatut=''; $object_statut=''; $toselect=''; $search_array_options=array(); + $search_categ_cus=0; + } if ($object_statut != '') $viewstatut=$object_statut; @@ -214,6 +234,7 @@ if (empty($reshook)) $objectlabel='Proposals'; $permtoread = $user->rights->propal->lire; $permtodelete = $user->rights->propal->supprimer; + $permtoclose = $user->rights->propal->cloturer; $uploaddir = $conf->propal->multidir_output[$conf->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -241,12 +262,15 @@ $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; $sql.= " typent.code as typent_code,"; +$sql.= " ava.rowid as availability,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; -$sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; +$sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; $sql.= " pr.rowid as project_id, pr.ref as project_ref,"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= ' u.login'; +if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; + // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); // Add fields from hooks @@ -257,12 +281,15 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; +if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ + $sql.= ', '.MAIN_DB_PREFIX.'propal as p'; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."propal_extrafields as ef on (p.rowid = ef.fk_object)"; if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'propaldet as pd ON p.rowid=pd.fk_propal'; if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON p.fk_user_author = u.rowid'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr ON pr.rowid = p.fk_projet"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_availability as ava on (ava.rowid = p.fk_availability)"; // 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) @@ -284,6 +311,7 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search if ($search_ref) $sql .= natural_search('p.ref', $search_ref); if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer); if ($search_refproject) $sql .= natural_search('pr.ref', $search_refprojet); +if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->escape($search_availability).')'; if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_login) $sql .= natural_search("u.login", $search_login); @@ -293,6 +321,9 @@ if ($search_montant_ttc != '') $sql.= natural_search("p.total", $search_montant_ if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } +if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL"; + if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$db->escape($search_product_category); if ($socid > 0) $sql.= ' AND s.rowid = '.$socid; if ($viewstatut != '' && $viewstatut != '-1') @@ -312,6 +343,32 @@ else if ($search_year > 0) { $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } +if ($search_monthfin > 0) +{ + if ($search_yearfin > 0 && empty($search_dayfin)) + $sql.= " AND p.fin_validite BETWEEN '".$db->idate(dol_get_first_day($search_yearfin,$search_monthfin,false))."' AND '".$db->idate(dol_get_last_day($search_yearfin,$search_monthfin,false))."'"; + else if ($search_yearfin > 0 && ! empty($search_dayfin)) + $sql.= " AND p.fin_validite BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_monthfin, $search_dayfin, $search_yearfin))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_monthfin, $search_dayfin, $search_yearfin))."'"; + else + $sql.= " AND date_format(p.fin_validite, '%m') = '".$db->escape($search_monthfin)."'"; +} +else if ($search_yearfin > 0) +{ + $sql.= " AND p.fin_validite BETWEEN '".$db->idate(dol_get_first_day($search_yearfin,1,false))."' AND '".$db->idate(dol_get_last_day($search_yearfin,12,false))."'"; +} +if ($search_monthdelivery > 0) +{ + if ($search_yeardelivery > 0 && empty($search_daydelivery)) + $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_yeardelivery,$search_monthdelivery,false))."' AND '".$db->idate(dol_get_last_day($search_yeardelivery,$search_monthdelivery,false))."'"; + else if ($search_yeardelivery > 0 && ! empty($search_daydelivery)) + $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_monthdelivery, $search_daydelivery, $search_yeardelivery))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_monthdelivery, $search_daydelivery, $search_yeardelivery))."'"; + else + $sql.= " AND date_format(p.date_livraison, '%m') = '".$db->escape($search_monthdelivery)."'"; +} +else if ($search_yeardelivery > 0) +{ + $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_yeardelivery,1,false))."' AND '".$db->idate(dol_get_last_day($search_yeardelivery,12,false))."'"; +} if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale); if ($search_user > 0) { @@ -334,6 +391,12 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -379,6 +442,8 @@ if ($resql) if ($search_zip) $param.='&search_zip='.urlencode($search_zip); if ($socid > 0) $param.='&socid='.urlencode($socid); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus); + if ($search_product_category != '') $param.='&search_product_category='.$search_product_category; // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -389,9 +454,18 @@ if ($resql) 'builddoc'=>$langs->trans("PDFMerge"), ); if ($user->rights->propal->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); - if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); + if ($user->rights->propal->cloturer) $arrayofmassactions['closed']=$langs->trans("Closed"); + if (in_array($massaction, array('presend','predelete','closed'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); + $newcardbutton=''; + if ($user->rights->propal->creer) + { + $newcardbutton=''.$langs->trans('NewPropal').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + // Lignes des champs de filtre print ''; if ($optioncss != '') print ''; @@ -403,7 +477,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); $topicmail="SendPropalRef"; $modelmail="proposal_send"; @@ -448,6 +522,14 @@ if ($resql) $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter.=''; } + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': '; + $moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',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; @@ -471,25 +553,25 @@ if ($resql) if (! empty($arrayfields['p.ref']['checked'])) { print '
'; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); + print ajax_combobox('search_type_thirdparty'); print ''; + print ''; //print $langs->trans('Month').': '; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; //print ' '.$langs->trans('Year').': '; $formother->select_year($search_year,'search_year',1, 20, 5); print ' '; + //print $langs->trans('Month').': '; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + //print ' '.$langs->trans('Year').': '; + $formother->select_year($search_yearfin,'search_yearfin',1, 20, 5); + print ''; + //print $langs->trans('Month').': '; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + //print ' '.$langs->trans('Year').': '; + $formother->select_year($search_yeardelivery,'search_yeardelivery',1, 20, 5); + print ''; + print $form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1); + print ajax_combobox('search_availability'); + print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''.dol_print_date($db->jdate($obj->ddelivery),'day'); + print ' '; + $form->form_availability('', $obj->availability, 'none', 1); + print '
'; + dol_print_error($db); } - $db->free($resql); - print "
'; +print ' - - - - - + + + + - - + + load("propal"); @@ -88,8 +89,6 @@ if ($resql) $i = 0; if ($num > 0 ) { - $var=true; - print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index cc8c6fe0547..bb8f6f623bb 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -41,6 +41,7 @@ global $user; $langs = $GLOBALS['langs']; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +// Load translation files required by the page $langs->load("propal"); $total=0; $ilink=0; @@ -52,18 +53,25 @@ foreach($linkedObjectBlock as $key => $objectlink) $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> -
trans("Proposal"); ?>getNomUrl(1); ?>ref_client; ?>date,'day'); ?>" data-element="element; ?>" data-id="id; ?>" > + trans("Proposal"); ?> + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) + { + $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; + print ' '; + } + ?> + getNomUrl(1); ?>ref_client; ?>date,'day'); ?>rights->propale->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink")); ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; print ''; print ''; @@ -126,8 +125,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $resql=$db->query($sql); if ($resql) { - $var=true; - $total=0; $num = $db->num_rows($resql); $i = 0; @@ -197,8 +194,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $i = 0; if ($num > 0) { - $var=true; - print '
'.$langs->trans("ProspectsByStatus").'
'; print ''; @@ -223,7 +218,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $i++; $total += $obj->price; } - if ($total>0) { + if ($total>0) + { print '"; } print "
'.$langs->trans("ProposalsOpened").'
'.$langs->trans("Total")."".price($total)."

"; @@ -255,8 +251,6 @@ if ($resql) $i = 0; if ($num > 0 ) { - $var=true; - print ''; print ''; diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index fe0fdc55b58..50127d719c8 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -26,8 +26,8 @@ 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'; -$langs->load("companies"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'other')); if (! empty($conf->facture->enabled)) $langs->load("bills"); // Security check diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 71add817dc5..6cd41c6c658 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -26,6 +26,7 @@ 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'; +// Load translation files required by the page $langs->load("companies"); if (! empty($conf->facture->enabled)) $langs->load("bills"); diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 6c812b90c12..6f3287b8831 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -26,13 +26,12 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -$langs->load("companies"); -$langs->load("orders"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'orders', 'bills')); $id=GETPOST("id",'int'); -$socid = GETPOST('id','int'); +$socid = GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int'); // Security check if ($user->societe_id > 0) { @@ -56,7 +55,14 @@ if (GETPOST('action','aZ09') == 'setremise') { $object = new Societe($db); $object->fetch($id); - $result=$object->set_remise_client(price2num(GETPOST("remise")),GETPOST("note"),$user); + + $discount_type = GETPOST('discount_type', 'int'); + + if(! empty($discount_type)) { + $result=$object->set_remise_supplier(price2num(GETPOST("remise")),GETPOST("note"),$user); + } else { + $result=$object->set_remise_client(price2num(GETPOST("remise")),GETPOST("note"),$user); + } if ($result > 0) { @@ -100,7 +106,8 @@ if ($socid > 0) $head = societe_prepare_head($object); - + $isCustomer = $object->client == 1 || $object->client == 3; + $isSupplier = $object->fournisseur == 1; print ''; print ''; @@ -114,11 +121,33 @@ if ($socid > 0) print '
'; print '
'; + + if(! $isCustomer && ! $isSupplier) { + print '

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

'; + + dol_fiche_end(); + + print ''; + + llxFooter(); + $db->close(); + exit; + } + print '
'.$langs->trans("ProspectToContact").'
'; - // Discount - print '"; + if($isCustomer) { + // Customer discount + print '"; + } + + if($isSupplier) { + // Supplier discount + print '"; + } + print '
'; - print $langs->trans("CustomerRelativeDiscount").''.price2num($object->remise_percent)."%
'; + print $langs->trans("CustomerRelativeDiscount").''.price2num($object->remise_percent)."%
'; + print $langs->trans("SupplierRelativeDiscount").''.price2num($object->remise_supplier_percent)."%
'; print '
'; @@ -126,8 +155,24 @@ if ($socid > 0) print '
'; + if($isCustomer && ! $isSupplier) { + print ''; + } + + if(! $isCustomer && $isSupplier) { + print ''; + } + print ''; + if($isCustomer && $isSupplier) { + // Discount type + print ''; + print ''; + } + // New value print ''; @@ -155,57 +200,128 @@ if ($socid > 0) print '
'; + if($isCustomer) { + if($isSupplier) { + print '
'; + print '
'; + print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); + } - /* - * List log of all percent discounts - */ - $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 = " . $object->id; - $sql.= " AND rc.entity = " . $conf->entity; - $sql.= " AND u.rowid = rc.fk_user_author"; - $sql.= " ORDER BY rc.datec DESC"; + /* + * List log of all customer percent discounts + */ + $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 = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND u.rowid = rc.fk_user_author"; + $sql.= " ORDER BY rc.datec DESC"; - $resql=$db->query($sql); - if ($resql) - { - print '
'.$langs->trans('DiscountType').' '; + print ' '; + print '
'; print $langs->trans("NewValue").'%
'; - $tag = !$tag; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $num = $db->num_rows($resql); - if ($num > 0) - { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $i++; - } + $resql=$db->query($sql); + if ($resql) + { + print '
'.$langs->trans("Date").''.$langs->trans("CustomerRelativeDiscountShort").''.$langs->trans("NoteReason").''.$langs->trans("User").'
'.dol_print_date($db->jdate($obj->dc),"dayhour").''.price2num($obj->remise_percent).'%'.$obj->note.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'
'; + $tag = !$tag; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $num = $db->num_rows($resql); + if ($num > 0) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + $db->free($resql); + print "
'.$langs->trans("Date").''.$langs->trans("CustomerRelativeDiscountShort").''.$langs->trans("NoteReason").''.$langs->trans("User").'
'.dol_print_date($db->jdate($obj->dc),"dayhour").''.price2num($obj->remise_percent).'%'.$obj->note.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'
'.$langs->trans("None").'
"; } else { - print '
'.$langs->trans("None").'
"; - } - else - { - dol_print_error($db); } + if($isSupplier) { + if($isCustomer) { + print ''; // class="fichehalfleft" + print '
'; + print '
'; + print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); + } + + /* + * List log of all supplier percent discounts + */ + $sql = "SELECT rc.rowid, rc.remise_supplier as remise_percent, rc.note, rc.datec as dc,"; + $sql.= " u.login, u.rowid as user_id"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_supplier as rc, ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE rc.fk_soc = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND u.rowid = rc.fk_user_author"; + $sql.= " ORDER BY rc.datec DESC"; + + $resql=$db->query($sql); + if ($resql) + { + print ''; + $tag = !$tag; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $num = $db->num_rows($resql); + if ($num > 0) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + $db->free($resql); + print "
'.$langs->trans("Date").''.$langs->trans("CustomerRelativeDiscountShort").''.$langs->trans("NoteReason").''.$langs->trans("User").'
'.dol_print_date($db->jdate($obj->dc),"dayhour").''.price2num($obj->remise_percent).'%'.$obj->note.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'
'.$langs->trans("None").'
"; + } + else + { + dol_print_error($db); + } + + if($isCustomer) { + print '
'; // class="ficheaddleft" + print '
'; // class="fichehalfright" + print ''; // class="fichecenter" + } + } } llxFooter(); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 0127b8f15be..3eec109e6b3 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -26,11 +26,11 @@ 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.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; -$langs->load("orders"); -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'bills', 'companies')); $id=GETPOST('id','int'); @@ -92,6 +92,12 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') $newdiscount2->fk_facture=$discount->fk_facture; $newdiscount1->fk_facture_line=$discount->fk_facture_line; $newdiscount2->fk_facture_line=$discount->fk_facture_line; + $newdiscount1->fk_invoice_supplier_source=$discount->fk_invoice_supplier_source; + $newdiscount2->fk_invoice_supplier_source=$discount->fk_invoice_supplier_source; + $newdiscount1->fk_invoice_supplier=$discount->fk_invoice_supplier; + $newdiscount2->fk_invoice_supplier=$discount->fk_invoice_supplier; + $newdiscount1->fk_invoice_supplier_line=$discount->fk_invoice_supplier_line; + $newdiscount2->fk_invoice_supplier_line=$discount->fk_invoice_supplier_line; if ($discount->description == '(CREDIT_NOTE)' || $discount->description == '(DEPOSIT)') { $newdiscount1->description=$discount->description; @@ -106,6 +112,8 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') $newdiscount2->fk_user=$discount->fk_user; $newdiscount1->fk_soc=$discount->fk_soc; $newdiscount2->fk_soc=$discount->fk_soc; + $newdiscount1->discount_type=$discount->discount_type; + $newdiscount2->discount_type=$discount->discount_type; $newdiscount1->datec=$discount->datec; $newdiscount2->datec=$discount->datec; $newdiscount1->tva_tx=$discount->tva_tx; @@ -143,6 +151,7 @@ if ($action == 'setremise' && $user->rights->societe->creer) $amount_ht=GETPOST('amount_ht'); $desc=GETPOST('desc','alpha'); $tva_tx=GETPOST('tva_tx','alpha'); + $discount_type=! empty($_POST['discount_type'])?GETPOST('discount_type','alpha'):0; if (price2num($amount_ht) > 0) { @@ -157,7 +166,7 @@ if ($action == 'setremise' && $user->rights->societe->creer) { $soc = new Societe($db); $soc->fetch($id); - $discountid=$soc->set_remise_except($amount_ht,$user,$desc,$tva_tx); + $discountid=$soc->set_remise_except($amount_ht,$user,$desc,$tva_tx,$discount_type); if ($discountid > 0) { @@ -215,6 +224,7 @@ if (GETPOST('action','aZ09') == 'confirm_remove' && GETPOST("confirm")=='yes') $form=new Form($db); $facturestatic=new Facture($db); +$facturefournstatic=new FactureFournisseur($db); llxHeader('',$langs->trans("GlobalDiscount")); @@ -224,12 +234,14 @@ if ($socid > 0) $object = new Societe($db); $object->fetch($socid); + $isCustomer = $object->client == 1 || $object->client == 3; + $isSupplier = $object->fournisseur == 1; + /* * Display tabs */ $head = societe_prepare_head($object); - print '
'; print ''; print ''; @@ -242,36 +254,85 @@ if ($socid > 0) print '
'; print '
'; + + if(! $isCustomer && ! $isSupplier) { + print '

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

'; + + dol_fiche_end(); + + print ''; + + llxFooter(); + $db->close(); + exit; + } + + 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 = " . $object->id; - $sql.= " AND rc.entity = " . $conf->entity; - $sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; - $sql.= " GROUP BY rc.fk_user"; - $resql=$db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $remise_all+=$obj->amount; - if ($obj->fk_user == $user->id) $remise_user+=$obj->amount; - } - else - { - dol_print_error($db); + if($isCustomer) { // Calcul avoirs client 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 = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND discount_type = 0"; // Exclude supplier discounts + $sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; + $sql.= " GROUP BY rc.fk_user"; + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $remise_all+=$obj->amount; + if ($obj->fk_user == $user->id) $remise_user+=$obj->amount; + } + else + { + dol_print_error($db); + } + + print ''; + print ''; + + if (! empty($user->fk_soc)) // No need to show this for external users + { + print ''; + print ''; + } } - print ''; - print ''; - - if (! empty($user->fk_soc)) // No need to show this for external users - { - print ''; - print ''; + if($isSupplier) { + // Calcul avoirs fournisseur 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 = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND discount_type = 1"; // Exclude customer discounts + $sql.= " AND (fk_invoice_supplier_line IS NULL AND fk_invoice_supplier IS NULL)"; + $sql.= " GROUP BY rc.fk_user"; + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $remise_all+=$obj->amount; + if ($obj->fk_user == $user->id) $remise_user+=$obj->amount; + } + else + { + dol_print_error($db); + } + + print ''; + print ''; + + if (! empty($user->fk_soc)) // No need to show this for external users + { + print ''; + print ''; + } } + print '
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("CustomerAbsoluteDiscountMy").''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("CustomerAbsoluteDiscountMy").''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("SupplierAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("SupplierAbsoluteDiscountMy").''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'; print '
'; @@ -283,7 +344,22 @@ if ($socid > 0) print load_fiche_titre($langs->trans("NewGlobalDiscount"),'',''); print '
'; + + if($isCustomer && ! $isSupplier) { + print ''; + } + + if(! $isCustomer && $isSupplier) { + print ''; + } + print ''; + if($isCustomer && $isSupplier) { + print ''; + print ''; + } print ''; print ''; @@ -321,132 +397,287 @@ if ($socid > 0) print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.GETPOST('remid'), $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } + /* - * Liste remises fixes restant en cours (= liees a aucune facture ni ligne de facture) + * Liste remises fixes client 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,"; - $sql.= " rc.fk_facture_source,"; - $sql.= " u.login, u.rowid as user_id,"; - $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 = " . $object->id; - $sql.= " AND rc.entity = " . $conf->entity; - $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"; + + print load_fiche_titre($langs->trans("DiscountStillRemaining")); - $resql=$db->query($sql); - if ($resql) - { - print load_fiche_titre($langs->trans("DiscountStillRemaining")); - print '
'.$langs->trans('DiscountType').' '; + print ' '; + print '
'.$langs->trans("AmountHT").''; print ' '.$langs->trans("Currency".$conf->currency).'
'; - print ''; - print ''; // Need 120+ for format with AM/PM - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + if($isCustomer) { + if($isSupplier) { + print '
'; + print '
'; + print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); + } - $showconfirminfo=array(); - - $i = 0; - $num = $db->num_rows($resql); - if ($num > 0) + $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; + $sql.= " rc.datec as dc, rc.description,"; + $sql.= " rc.fk_facture_source,"; + $sql.= " u.login, u.rowid as user_id,"; + $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 = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND u.rowid = rc.fk_user"; + $sql.= " AND rc.discount_type = 0"; // Eliminate supplier discounts + $sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)"; + $sql.= " ORDER BY rc.datec DESC"; + + $resql=$db->query($sql); + if ($resql) { - while ($i < $num) - { - $obj = $db->fetch_object($resql); - - print '
'; - print ''; - if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) - { - print ''; - } - elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) - { - print ''; - } - elseif (preg_match('/\(EXCESS RECEIVED\)/',$obj->description)) - { - print ''; - } - else - { - print ''; - } - print ''; - print ''; - print ''; - print ''; - print ''; - if ($user->rights->societe->creer || $user->rights->facture->creer) - { - print ''; - } - else print ''; - print ''; - - if ($_GET["action"]=='split' && GETPOST('remid') == $obj->rowid) - { - $showconfirminfo['rowid']=$obj->rowid; - $showconfirminfo['amount_ttc']=$obj->amount_ttc; - } - $i++; - } + print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(EXCESS RECEIVED\)/',$langs->trans("ExcessReceived"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - print $obj->description; - print ''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; - print ''; - print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).''; - print '   '; - print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).''; - print ' 
'; + print ''; + print ''; // Need 120+ for format with AM/PM + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $showconfirminfo=array(); + + $i = 0; + $num = $db->num_rows($resql); + if ($num > 0) + { + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + print ''; + print ''; + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(EXCESS RECEIVED\)/',$obj->description)) + { + print ''; + } + else + { + print ''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + if ($user->rights->societe->creer || $user->rights->facture->creer) + { + print ''; + } + else print ''; + print ''; + + if ($_GET["action"]=='split' && GETPOST('remid') == $obj->rowid) + { + $showconfirminfo['rowid']=$obj->rowid; + $showconfirminfo['amount_ttc']=$obj->amount_ttc; + } + $i++; + } + } + else + { + print ''; + } + $db->free($resql); + print "
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(EXCESS RECEIVED\)/',$langs->trans("ExcessReceived"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + print $obj->description; + print ''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ''; + print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).''; + print '   '; + print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print ' 
'.$langs->trans("None").'
"; + + if (count($showconfirminfo)) + { + $amount1=price2num($showconfirminfo['amount_ttc']/2,'MT'); + $amount2=($showconfirminfo['amount_ttc']-$amount1); + $formquestion=array( + 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), + array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), + 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='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage?'&backtopage='.urlencode($backtopage):''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + } } else { - print '
'.$langs->trans("None").'
"; - - if (count($showconfirminfo)) - { - $amount1=price2num($showconfirminfo['amount_ttc']/2,'MT'); - $amount2=($showconfirminfo['amount_ttc']-$amount1); - $formquestion=array( - 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), - array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), - 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='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage?'&backtopage='.urlencode($backtopage):''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + dol_print_error($db); } } - else - { - dol_print_error($db); + + if($isSupplier) { + if($isCustomer) { + print ''; // class="fichehalfleft" + print '
'; + print '
'; + print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); + } + + /* + * Liste remises fixes fournisseur 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,"; + $sql.= " rc.fk_invoice_supplier_source,"; + $sql.= " u.login, u.rowid as user_id,"; + $sql.= " fa.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_fourn as fa ON rc.fk_invoice_supplier_source = fa.rowid"; + $sql.= " WHERE rc.fk_soc = " . $object->id; + $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND u.rowid = rc.fk_user"; + $sql.= " AND rc.discount_type = 1"; // Eliminate customer discounts + $sql.= " AND (rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_line IS NULL)"; + $sql.= " ORDER BY rc.datec DESC"; + + $resql=$db->query($sql); + if ($resql) + { + print ''; + print ''; + print ''; // Need 120+ for format with AM/PM + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $showconfirminfo=array(); + + $i = 0; + $num = $db->num_rows($resql); + if ($num > 0) + { + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + print ''; + print ''; + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(EXCESS PAID\)/',$obj->description)) + { + print ''; + } + else + { + print ''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + if ($user->rights->societe->creer || $user->rights->facture->creer) + { + print ''; + } + else print ''; + print ''; + + if ($_GET["action"]=='split' && GETPOST('remid') == $obj->rowid) + { + $showconfirminfo['rowid']=$obj->rowid; + $showconfirminfo['amount_ttc']=$obj->amount_ttc; + } + $i++; + } + } + else + { + print ''; + } + $db->free($resql); + print "
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(EXCESS PAID\)/',$langs->trans("ExcessPaid"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + print $obj->description; + print ''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ''; + print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).''; + print '   '; + print 'rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print ' 
'.$langs->trans("None").'
"; + + if (count($showconfirminfo)) + { + $amount1=price2num($showconfirminfo['amount_ttc']/2,'MT'); + $amount2=($showconfirminfo['amount_ttc']-$amount1); + $formquestion=array( + 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), + array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), + 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='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage?'&backtopage='.urlencode($backtopage):''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + } + } + else + { + dol_print_error($db); + } + + if($isCustomer) { + print '
'; // class="ficheaddleft" + print '
'; // class="fichehalfright" + print ''; // class="fichecenter" + } } print '
'; @@ -454,150 +685,317 @@ if ($socid > 0) /* * List discount consumed (=liees a une ligne de facture ou facture) */ + + print load_fiche_titre($langs->trans("DiscountAlreadyCounted")); - // Remises liees a lignes de factures - $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; - $sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; - $sql.= " rc.fk_facture_source,"; - $sql.= " u.login, u.rowid as user_id,"; - $sql.= " f.rowid, f.facnumber,"; - $sql.= " fa.facnumber as ref, fa.type as type"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql.= " , ".MAIN_DB_PREFIX."user as u"; - $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 =". $object->id; - $sql.= " AND rc.fk_facture_line = fc.rowid"; - $sql.= " AND fc.fk_facture = f.rowid"; - $sql.= " AND rc.fk_user = u.rowid"; - $sql.= " ORDER BY dc DESC"; - //$sql.= " UNION "; - // Remises liees a factures - $sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; - $sql2.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; - $sql2.= " rc.fk_facture_source,"; - $sql2.= " u.login, u.rowid as user_id,"; - $sql2.= " f.rowid, f.facnumber,"; - $sql2.= " fa.facnumber as ref, fa.type as type"; - $sql2.= " FROM ".MAIN_DB_PREFIX."facture as f"; - $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 =". $object->id; - $sql2.= " AND rc.fk_facture = f.rowid"; - $sql2.= " AND rc.fk_user = u.rowid"; - - $sql2.= " ORDER BY dc DESC"; - - $resql=$db->query($sql); - $resql2=null; - if ($resql) $resql2=$db->query($sql2); - if ($resql2) - { - print load_fiche_titre($langs->trans("DiscountAlreadyCounted")); - print ''; - print ''; - print ''; // Need 120+ for format with AM/PM - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - $tab_sqlobj=array(); - $tab_sqlobjOrder=array(); - $num = $db->num_rows($resql); - if ($num > 0) - { - for ($i = 0;$i < $num; $i++) - { - $sqlobj = $db->fetch_object($resql); - $tab_sqlobj[] = $sqlobj; - $tab_sqlobjOrder[]=$db->jdate($sqlobj->dc); - } + if($isCustomer) { + if($isSupplier) { + print '
'; + print '
'; + print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } - $db->free($resql); - $num = $db->num_rows($resql2); - for ($i = 0;$i < $num;$i++) + // Remises liees a lignes de factures + $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; + $sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; + $sql.= " rc.fk_facture_source,"; + $sql.= " u.login, u.rowid as user_id,"; + $sql.= " f.rowid, f.facnumber,"; + $sql.= " fa.facnumber as ref, fa.type as type"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql.= " , ".MAIN_DB_PREFIX."user as u"; + $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 =". $object->id; + $sql.= " AND rc.fk_facture_line = fc.rowid"; + $sql.= " AND fc.fk_facture = f.rowid"; + $sql.= " AND rc.fk_user = u.rowid"; + $sql.= " AND rc.discount_type = 0"; // Eliminate supplier discounts + $sql.= " ORDER BY dc DESC"; + //$sql.= " UNION "; + // Remises liees a factures + $sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; + $sql2.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; + $sql2.= " rc.fk_facture_source,"; + $sql2.= " u.login, u.rowid as user_id,"; + $sql2.= " f.rowid, f.facnumber,"; + $sql2.= " fa.facnumber as ref, fa.type as type"; + $sql2.= " FROM ".MAIN_DB_PREFIX."facture as f"; + $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 =". $object->id; + $sql2.= " AND rc.fk_facture = f.rowid"; + $sql2.= " AND rc.fk_user = u.rowid"; + $sql2.= " AND rc.discount_type = 0"; // Eliminate supplier discounts + $sql2.= " ORDER BY dc DESC"; + + $resql=$db->query($sql); + $resql2=null; + if ($resql) $resql2=$db->query($sql2); + if ($resql2) { - $sqlobj = $db->fetch_object($resql2); - $tab_sqlobj[] = $sqlobj; - $tab_sqlobjOrder[]= $db->jdate($sqlobj->dc); - } - $db->free($resql2); - array_multisort($tab_sqlobjOrder,SORT_DESC,$tab_sqlobj); - - $num = count($tab_sqlobj); - if ($num > 0) - { - $i = 0 ; - while ($i < $num ) - { - $obj = array_shift($tab_sqlobj); - print '
'; - print ''; - if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) - { - print ''; - } - elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) - { - print ''; - } - elseif (preg_match('/\(EXCESS RECEIVED\)/',$obj->description)) - { - print ''; - } - else - { - print ''; - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $i++; - } + print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - $facturestatic->id=$obj->fk_facture_source; - $facturestatic->ref=$obj->ref; - $facturestatic->type=$obj->type; - print preg_replace('/\(EXCESS RECEIVED\)/',$langs->trans("Invoice"),$obj->description).' '.$facturestatic->getNomURl(1); - print ''; - print $obj->description; - print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; - print ' 
'; + print ''; + print ''; // Need 120+ for format with AM/PM + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $tab_sqlobj=array(); + $tab_sqlobjOrder=array(); + $num = $db->num_rows($resql); + if ($num > 0) + { + for ($i = 0;$i < $num; $i++) + { + $sqlobj = $db->fetch_object($resql); + $tab_sqlobj[] = $sqlobj; + $tab_sqlobjOrder[]=$db->jdate($sqlobj->dc); + } + } + $db->free($resql); + + $num = $db->num_rows($resql2); + for ($i = 0;$i < $num;$i++) + { + $sqlobj = $db->fetch_object($resql2); + $tab_sqlobj[] = $sqlobj; + $tab_sqlobjOrder[]= $db->jdate($sqlobj->dc); + } + $db->free($resql2); + array_multisort($tab_sqlobjOrder,SORT_DESC,$tab_sqlobj); + + $num = count($tab_sqlobj); + if ($num > 0) + { + $i = 0 ; + while ($i < $num ) + { + $obj = array_shift($tab_sqlobj); + print ''; + print ''; + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(EXCESS RECEIVED\)/',$obj->description)) + { + print ''; + } + else + { + print ''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + + print "
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + $facturestatic->id=$obj->fk_facture_source; + $facturestatic->ref=$obj->ref; + $facturestatic->type=$obj->type; + print preg_replace('/\(EXCESS RECEIVED\)/',$langs->trans("Invoice"),$obj->description).' '.$facturestatic->getNomURl(1); + print ''; + print $obj->description; + print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ' 
'.$langs->trans("None").'
"; } else { - print '
'.$langs->trans("None").'
"; - } - else - { - dol_print_error($db); - } + // Remises liees a lignes de factures + $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; + $sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,"; + $sql.= " rc.fk_invoice_supplier_source,"; + $sql.= " u.login, u.rowid as user_id,"; + $sql.= " f.rowid, f.ref as facnumber,"; + $sql.= " fa.ref, fa.type as type"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql.= " , ".MAIN_DB_PREFIX."user as u"; + $sql.= " , ".MAIN_DB_PREFIX."facture_fourn_det as fc"; + $sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as fa ON rc.fk_invoice_supplier_source = fa.rowid"; + $sql.= " WHERE rc.fk_soc =". $object->id; + $sql.= " AND rc.fk_invoice_supplier_line = fc.rowid"; + $sql.= " AND fc.fk_facture_fourn = f.rowid"; + $sql.= " AND rc.fk_user = u.rowid"; + $sql.= " AND rc.discount_type = 1"; // Eliminate customer discounts + $sql.= " ORDER BY dc DESC"; + //$sql.= " UNION "; + // Remises liees a factures + $sql2 = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; + $sql2.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,"; + $sql2.= " rc.fk_invoice_supplier_source,"; + $sql2.= " u.login, u.rowid as user_id,"; + $sql2.= " f.rowid, f.ref as facnumber,"; + $sql2.= " fa.ref, fa.type as type"; + $sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql2.= " , ".MAIN_DB_PREFIX."user as u"; + $sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; + $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as fa ON rc.fk_invoice_supplier_source = fa.rowid"; + $sql2.= " WHERE rc.fk_soc =". $object->id; + $sql2.= " AND rc.fk_invoice_supplier = f.rowid"; + $sql2.= " AND rc.fk_user = u.rowid"; + $sql2.= " AND rc.discount_type = 1"; // Eliminate customer discounts + $sql2.= " ORDER BY dc DESC"; + + $resql=$db->query($sql); + $resql2=null; + if ($resql) $resql2=$db->query($sql2); + if ($resql2) + { + print ''; + print ''; + print ''; // Need 120+ for format with AM/PM + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $tab_sqlobj=array(); + $tab_sqlobjOrder=array(); + $num = $db->num_rows($resql); + if ($num > 0) + { + for ($i = 0;$i < $num; $i++) + { + $sqlobj = $db->fetch_object($resql); + $tab_sqlobj[] = $sqlobj; + $tab_sqlobjOrder[]=$db->jdate($sqlobj->dc); + } + } + $db->free($resql); + + $num = $db->num_rows($resql2); + for ($i = 0;$i < $num;$i++) + { + $sqlobj = $db->fetch_object($resql2); + $tab_sqlobj[] = $sqlobj; + $tab_sqlobjOrder[]= $db->jdate($sqlobj->dc); + } + $db->free($resql2); + array_multisort($tab_sqlobjOrder,SORT_DESC,$tab_sqlobj); + + $num = count($tab_sqlobj); + if ($num > 0) + { + $i = 0 ; + while ($i < $num ) + { + $obj = array_shift($tab_sqlobj); + print ''; + print ''; + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) + { + print ''; + } + elseif (preg_match('/\(EXCESS PAID\)/',$obj->description)) + { + print ''; + } + else + { + print ''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + + print "
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").' 
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + $facturefournstatic->id=$obj->fk_invoice_supplier_source; + $facturefournstatic->ref=$obj->ref; + $facturefournstatic->type=$obj->type; + print preg_replace('/\(EXCESS PAID\)/',$langs->trans("Invoice"),$obj->description).' '.$facturefournstatic->getNomURl(1); + print ''; + print $obj->description; + print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ' 
'.$langs->trans("None").'
"; + } + else + { + dol_print_error($db); + } + if($isCustomer) { + print ''; // class="ficheaddleft" + print ''; // class="fichehalfright" + print ''; // class="fichecenter" + } + } } llxFooter(); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 26166ab3f75..80b71c2a428 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -28,9 +28,9 @@ */ /** - * \file htdocs/commande/card.php + * \file htdocs/commande/card.php * \ingroup commande - * \brief Page to show customer order + * \brief Page to show customer order */ require '../main.inc.php'; @@ -56,15 +56,8 @@ if (!empty($conf->variants->enabled)) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } -$langs->load('orders'); -$langs->load('sendings'); -$langs->load('companies'); -$langs->load('bills'); -$langs->load('propal'); -$langs->load('deliveries'); -$langs->load('sendings'); -$langs->load('products'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('orders','sendings','companies','bills','propal','deliveries','products','other')); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); if (! empty($conf->productbatch->enabled)) $langs->load("productbatch"); @@ -76,6 +69,7 @@ $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $lineid = GETPOST('lineid', 'int'); +$projectid = GETPOST('projectid', 'int'); $origin = GETPOST('origin', 'alpha'); $originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility @@ -228,7 +222,7 @@ if (empty($reshook)) // Link to a project else if ($action == 'classin' && $user->rights->commande->creer) { - $object->setProject(GETPOST('projectid')); + $object->setProject(GETPOST('projectid','int')); } // Add order @@ -259,8 +253,8 @@ if (empty($reshook)) $object->note_private = GETPOST('note_private','none'); $object->note_public = GETPOST('note_public','none'); $object->source = GETPOST('source_id'); - $object->fk_project = GETPOST('projectid'); - $object->ref_client = GETPOST('ref_client'); + $object->fk_project = GETPOST('projectid','int'); + $object->ref_client = GETPOST('ref_client','alpha'); $object->modelpdf = GETPOST('model'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); @@ -365,8 +359,7 @@ if (empty($reshook)) } // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if - // trigger used + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if trigger used { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_options = $lines[$i]->array_options; @@ -375,7 +368,12 @@ if (empty($reshook)) $tva_tx = $lines[$i]->tva_tx; if (! empty($lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; - $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, $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); + $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, $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++; @@ -805,7 +803,27 @@ if (empty($reshook)) // If price per quantity and customer elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - // TODO Same than PRODUIT_CUSTOMER_PRICES_BY_QTY but using $object->thirdparty->price_level + if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity + { + // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. + $pqp = GETPOST('pbq','int'); + // Search price into product_price_by_qty from $prod->id + foreach($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) + { + if ($priceforthequantityarray['rowid'] != $pqp) continue; + // We found the price + if ($priceforthequantityarray['price_base_type'] == 'HT') + { + $pu_ht = $priceforthequantityarray['unitprice']; + } + else + { + $pu_ttc = $priceforthequantityarray['unitprice']; + } + // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. + break; + } + } } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); @@ -1026,8 +1044,8 @@ if (empty($reshook)) $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]; + if ((! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_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') : ''); @@ -1277,24 +1295,16 @@ if (empty($reshook)) if (! $error) { - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('orderdao')); - $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('ORDER_MODIFY'); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } else if ($reshook < 0) + // Actions on extra fields + $result = $object->insertExtraFields('ORDER_MODIFY'); + if ($result < 0) + { + setEventMessages($object->error, $object->errors, 'errors'); $error++; + } } - if ($error) - $action = 'edit_extras'; + if ($error) $action = 'edit_extras'; } if ($action == 'set_thirdparty' && $user->rights->commande->creer) @@ -1391,7 +1401,6 @@ if ($action == 'create' && $user->rights->commande->creer) if ($socid > 0) $res = $soc->fetch($socid); - $projectid = 0; $remise_absolue = 0; $currency_code = $conf->currency; @@ -1450,7 +1459,7 @@ if ($action == 'create' && $user->rights->commande->creer) $ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : ''); $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)); + $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:0)); // TODO maybe add default value option $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); $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)); @@ -1488,7 +1497,6 @@ if ($action == 'create' && $user->rights->commande->creer) $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; @@ -1496,7 +1504,6 @@ if ($action == 'create' && $user->rights->commande->creer) $note_public = $object->getDefaultCreateValueFor('note_public'); } - print '
'; print ''; print ''; @@ -1558,17 +1565,14 @@ if ($action == 'create' && $user->rights->commande->creer) // Ligne info remises tiers print '' . $langs->trans('Discounts') . ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); - print '. '; + $absolute_discount = $soc->getAvailableDiscounts(); - if ($absolute_discount) - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency" . $conf->currency)); - else - print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print '.'; + + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print ''; } // Date @@ -1665,7 +1669,7 @@ if ($action == 'create' && $user->rights->commande->creer) $parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -1991,17 +1995,17 @@ if ($action == 'create' && $user->rights->commande->creer) { if ($action != 'classify') $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); @@ -2040,12 +2044,11 @@ if ($action == 'create' && $user->rights->commande->creer) // Relative and absolute discounts if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final - // invoice + $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')"; - $filtercreditnote = "fk_facture_source IS NOT NULL AND description NOT LIKE '(DEPOSIT)%'"; + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; } $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; @@ -2053,29 +2056,17 @@ if ($action == 'create' && $user->rights->commande->creer) $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; print '' . $langs->trans('Discounts') . ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); - print '. '; - $absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL'); - $absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL'); + + $absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount); + $absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote); $absolute_discount = price2num($absolute_discount, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT'); - if ($absolute_discount) { - if ($object->statut > Commande::STATUS_DRAFT) { - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); - } else { - // Remise dispo de type remise fixe (not credit note) - print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, 0, '', 1); - } - } - if ($absolute_creditnote) { - print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '. '; - } - if (! $absolute_discount && ! $absolute_creditnote) - print $langs->trans("CompanyHasNoAbsoluteDiscount") . '.'; + + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?id=' . $object->id); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print ''; // Date @@ -2475,7 +2466,7 @@ if ($action == 'create' && $user->rights->commande->creer) /* * Form to add new line */ - if ($object->statut == Commande::STATUS_DRAFT && $user->rights->commande->creer) + if ($object->statut == Commande::STATUS_DRAFT && $user->rights->commande->creer && $action != 'selectlines') { if ($action != 'editline') { @@ -2506,9 +2497,9 @@ if ($action == 'create' && $user->rights->commande->creer) // Send if ($object->statut > Commande::STATUS_DRAFT) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { - print ''; + print ''; } else - print ''; + print ''; } // Valid @@ -2647,9 +2638,8 @@ if ($action == 'create' && $user->rights->commande->creer) $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); // Show online payment link - //$useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); - $useonlinepayment = $conf->global->ORDER_SHOW_ONLINE_PAYMENT_ON_ORDER; - + $useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); + if (! empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) $useonlinepayment = 0; if ($object->statut != Commande::STATUS_DRAFT && $useonlinepayment) { print '
'; diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index cbd505a41b8..e52da47e11b 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -76,9 +76,11 @@ class Orders extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $this->commande->fetchObjectLinked(); + // Add external contacts ids + $this->commande->contacts_ids = $this->commande->liste_contact(-1,'external',1); + $this->commande->fetchObjectLinked(); return $this->_cleanObjectDatas($this->commande); - } + } @@ -159,6 +161,8 @@ class Orders extends DolibarrApi $obj = $db->fetch_object($result); $commande_static = new Commande($db); if($commande_static->fetch($obj->rowid)) { + // Add external contacts ids + $commande_static->contacts_ids = $commande_static->liste_contact(-1,'external',1); $obj_ret[] = $this->_cleanObjectDatas($commande_static); } $i++; @@ -179,7 +183,7 @@ class Orders extends DolibarrApi * @param array $request_data Request data * @return int ID of order */ - function post($request_data = NULL) + function post($request_data = null) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401, "Insuffisant rights"); @@ -245,7 +249,7 @@ class Orders extends DolibarrApi * * @return int */ - function postLine($id, $request_data = NULL) { + function postLine($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } @@ -308,7 +312,7 @@ class Orders extends DolibarrApi * * @return object */ - function putLine($id, $lineid, $request_data = NULL) { + function putLine($id, $lineid, $request_data = null) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } @@ -402,7 +406,7 @@ class Orders extends DolibarrApi * * @return int */ - function put($id, $request_data = NULL) { + function put($id, $request_data = null) { if (! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5cf5b6c7b40..ccdc03da9ab 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -79,10 +79,9 @@ class Commande extends CommonOrder */ public $statut; /** - * @deprecated - * @see billed + * Billed + * @var int */ - public $facturee; public $billed; // billed or not public $brouillon; @@ -545,7 +544,6 @@ class Commande extends CommonOrder { $this->statut = self::STATUS_VALIDATED; $this->billed = 0; - $this->facturee = 0; // deprecated $this->db->commit(); return 1; @@ -825,7 +823,7 @@ class Commande extends CommonOrder $line = $this->lines[$i]; // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array - //if (! is_object($line)) $line=json_decode(json_encode($line), FALSE); // convert recursively array into object. + //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. if (! is_object($line)) $line = (object) $line; // Reset fk_parent_line for no child products and special product @@ -1259,7 +1257,10 @@ class Commande extends CommonOrder { global $mysoc, $conf, $langs, $user; - 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, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise", LOG_DEBUG); + $logtext = "::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent"; + $logtext.= ", info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start"; + $logtext.= ", date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise"; + dol_syslog(get_class($this).$logtext, LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1277,6 +1278,7 @@ class Commande extends CommonOrder $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu_ht=price2num($pu_ht); + $pu_ht_devise=price2num($pu_ht_devise); $pu_ttc=price2num($pu_ttc); $pa_ht=price2num($pa_ht); $txtva = price2num($txtva); @@ -1400,7 +1402,6 @@ class Commande extends CommonOrder $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->origin=$origin; $this->line->origin_id=$origin_id; @@ -1533,8 +1534,8 @@ class Commande extends CommonOrder { $prod = new Product($this->db); $prod->fetch($idproduct); - $prod -> get_sousproduits_arbo (); - $prods_arbo = $prod->get_each_prod(); + $prod -> get_sousproduits_arbo(); + $prods_arbo = $prod->get_arbo_each_prod(); if(count($prods_arbo) > 0) { foreach($prods_arbo as $key => $value) @@ -1584,8 +1585,8 @@ class Commande extends CommonOrder $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 AND cr.entity IN ('.getEntity('c_payment_term').')'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON c.fk_mode_reglement = p.id AND p.entity IN ('.getEntity('c_paiement').')'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON c.fk_cond_reglement = cr.rowid'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON c.fk_mode_reglement = p.id'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON c.fk_availability = ca.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = ca.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid'; @@ -1625,7 +1626,6 @@ class Commande extends CommonOrder $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; $this->source = $obj->source; - $this->facturee = $obj->billed; // deprecated $this->billed = $obj->billed; $this->note = $obj->note_private; // deprecated $this->note_private = $obj->note_private; @@ -2702,7 +2702,6 @@ class Commande extends CommonOrder if (! $error) { $this->oldcopy= clone $this; - $this->facturee=1; // deprecated $this->billed=1; } @@ -2738,21 +2737,6 @@ class Commande extends CommonOrder } } - /** - * Classify the order as invoiced - * - * @return int <0 if ko, >0 if ok - * @deprecated - * @see classifyBilled() - */ - function classer_facturee() - { - global $user; - dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); - - return $this->classifyBilled($user); - } - /** * Classify the order as not invoiced * @@ -2774,7 +2758,6 @@ class Commande extends CommonOrder if (! $error) { $this->oldcopy= clone $this; - $this->facturee=1; // deprecated $this->billed=1; } @@ -2785,7 +2768,6 @@ class Commande extends CommonOrder if (! $error) { - $this->facturee=0; // deprecated $this->billed=0; $this->db->commit(); @@ -2863,6 +2845,7 @@ class Commande extends CommonOrder $qty=price2num($qty); $pu = price2num($pu); $pa_ht=price2num($pa_ht); + $pu_ht_devise=price2num($pu_ht_devise); $txtva=price2num($txtva); $txlocaltax1=price2num($txlocaltax1); $txlocaltax2=price2num($txlocaltax2); @@ -3136,6 +3119,12 @@ class Commande extends CommonOrder // End call triggers } + if ($this->nb_expedition() != 0) + { + $this->errors[] = $langs->trans('SomeShipmentExists'); + $error++; + } + if (! $error) { // Delete order details @@ -3314,7 +3303,6 @@ class Commande extends CommonOrder */ function getLibStatut($mode) { - if ($this->facturee && empty($this->billed)) $this->billed=$this->facturee; // For backward compatibility return $this->LibStatut($this->statut, $this->billed, $mode); } @@ -4225,7 +4213,7 @@ class OrderLine extends CommonOrderLine } } - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('LINEORDER_UPDATE',$user); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 0eb4ed2cd63..7669239134a 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->load("orders"); -$langs->load("sendings"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'sendings', 'companies')); $id=GETPOST('id','int'); $ref=GETPOST('ref','alpha'); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 205efc3ad91..9263ceb3f45 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -42,8 +42,8 @@ if ($user->societe_id > 0) if (! $user->rights->facture->creer) accessforbidden(); -$langs->load("companies"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array("companies", "orders")); $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -102,6 +102,12 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1, $offset); @@ -149,14 +155,10 @@ if ($resql) print "\n"; - $var=true; - while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - - print ''; print ''; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index ee688bed307..ffebbaa260a 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -36,9 +36,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } - -$langs->load('companies'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'other')); $action = GETPOST('action','aZ09'); $confirm = GETPOST('confirm'); @@ -69,6 +68,7 @@ $object = new Commande($db); /* * Actions */ + if ($object->fetch($id)) { $object->fetch_thirdparty(); @@ -163,7 +163,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - print ''; + print ''; print "
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
\n"; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index feacdd70b07..5cfb87c7a25 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; if (!$user->rights->commande->lire) accessforbidden(); -$langs->load("orders"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'bills')); // Security check $socid=GETPOST('socid','int'); diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 518ab856474..4bac4a3a447 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -33,8 +33,8 @@ if (! empty($conf->projet->enabled)) { if (!$user->rights->commande->lire) accessforbidden(); -$langs->load("orders"); -$langs->load("sendings"); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'sendings')); $socid=0; $comid = GETPOST("id",'int'); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 784f44aad4c..22d2e00a0c2 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +// Load translation files required by the page $langs->loadLangs(array("orders",'sendings','deliveries','companies','compta','bills')); $action=GETPOST('action','aZ09'); @@ -51,6 +52,7 @@ $massaction=GETPOST('massaction','alpha'); $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; $search_orderyear=GETPOST("search_orderyear","int"); $search_ordermonth=GETPOST("search_ordermonth","int"); @@ -72,6 +74,7 @@ $socid=GETPOST('socid','int'); $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); $search_total_ht=GETPOST('search_total_ht','alpha'); +$search_categ_cus=trim(GETPOST("search_categ_cus",'int')); $optioncss = GETPOST('optioncss','alpha'); $billed = GETPOST('billed','int'); $viewstatut=GETPOST('viewstatut'); @@ -95,11 +98,9 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='c.ref'; if (! $sortorder) $sortorder='DESC'; -// Initialize technical object to manage context to save list fields -$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array($contextpage)); +$object = new Commande($db); +$hookmanager->initHooks(array('orderlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -194,6 +195,7 @@ if (empty($reshook)) $billed=''; $toselect=''; $search_array_options=array(); + $search_categ_cus=0; } if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha') || GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha')) @@ -209,6 +211,7 @@ if (empty($reshook)) $uploaddir = $conf->commande->dir_output; $trigger_name='ORDER_SENTBYMAIL'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + } @@ -238,6 +241,8 @@ $sql.= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_clie $sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,'; $sql.= ' c.date_creation as date_creation, c.tms as date_update,'; $sql.= " p.rowid as project_id, p.ref as project_ref"; +if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; + // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); // Add fields from hooks @@ -248,6 +253,7 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; +if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; @@ -328,6 +334,8 @@ if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$sear if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; if ($search_total_ht != '') $sql.= natural_search('c.total_ht', $search_total_ht, 1); if ($search_project_ref != '') $sql.= natural_search("p.ref",$search_project_ref); +if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL"; // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -343,6 +351,12 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1,$offset); @@ -384,6 +398,7 @@ if ($resql) $arrayofselected=is_array($toselect)?$toselect:array(); $param=''; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($sall) $param.='&sall='.urlencode($sall); @@ -401,12 +416,20 @@ if ($resql) if ($search_user > 0) $param.='&search_user='.urlencode($search_user); if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht); - if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); - if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); - if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); + if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); + if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); + if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); + if ($search_town != '') $param.='&search_town='.urlencode($search_town); + if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip); + if ($search_state != '') $param.='&search_state='.urlencode($search_state); + if ($search_country != '') $param.='&search_country='.urlencode($search_country); + if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty); + if ($search_product_category != '') $param.='&search_product_category='.urlencode($search_product_category); + if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus); if ($show_files) $param.='&show_files=' .urlencode($show_files); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($billed != '') $param.='&billed='.urlencode($billed); + // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -414,12 +437,22 @@ if ($resql) $arrayofmassactions = array( 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), + 'cancelorders'=>$langs->trans("Cancel"), + ); if($user->rights->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if ($user->rights->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); + $newcardbutton=''; + if ($contextpage == 'orderlist' && $user->rights->commande->creer) + { + $newcardbutton=''.$langs->trans('NewOrder').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + // Lines of title fields print '
'; if ($optioncss != '') print ''; @@ -432,7 +465,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; $modelmail="order_send"; @@ -525,6 +558,14 @@ if ($resql) $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter.=''; } + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': '; + $moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',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; @@ -599,17 +640,17 @@ if ($resql) // Date order if (! empty($arrayfields['c.date_commande']['checked'])) { - print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; + print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; $formother->select_year($search_orderyear?$search_orderyear:-1,'search_orderyear',1, 20, 5); print ''; } if (! empty($arrayfields['c.date_delivery']['checked'])) { - print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; + print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; $formother->select_year($search_deliveryyear?$search_deliveryyear:-1,'search_deliveryyear',1, 20, 5); print ''; } diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6598805490d..6cff3bfb3bc 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -32,10 +32,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } - -$langs->load("companies"); -$langs->load("bills"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills', 'orders')); $id = GETPOST('id','int'); $ref=GETPOST('ref','alpha'); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index a15598ee82d..03d379270b1 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2017 Juanjo Menent + * Copyright (C) 2012-2018 Juanjo Menent * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -39,9 +39,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load('orders'); -$langs->load('deliveries'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array("orders", "deliveries", "companies")); if (! $user->rights->facture->creer) accessforbidden(); @@ -285,6 +284,13 @@ if (($action == 'create' || $action == 'add') && !$error) { $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_options = $lines[$i]->array_options; + } + $result = $object->addline( $desc, $lines[$i]->subprice, @@ -309,7 +315,8 @@ if (($action == 'create' || $action == 'add') && !$error) $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, - $lines[$i]->label + $lines[$i]->label, + $array_options ); if ($result > 0) { @@ -472,7 +479,7 @@ if ($action == 'create' && !$error) $parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { $object=new Facture($db); print $object->showOptionals($extrafields,'edit'); @@ -545,7 +552,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -647,7 +654,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; print '
'; - $var=true; + $generic_commande = new Commande($db); while ($i < $num) @@ -695,7 +702,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; // Statut - print ''.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).''; + print ''.$generic_commande->LibStatut($objp->fk_statut,$objp->billed,5).''; // Checkbox print ''; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index b1baf7332a1..8f259808357 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -55,10 +55,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$langs->load('orders'); -$langs->load('companies'); -$langs->load('other'); -$langs->load('suppliers'); +// Load translation files required by the page +$langs->loadLangs(array('orders', 'companies', 'other', 'suppliers')); /* @@ -354,7 +352,7 @@ print '
'; // Show graphs -print '"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { @@ -459,22 +458,10 @@ if ($result) } print ""; - // Bank of cheque - print ""; - if ($user->rights->banque->modifier || $user->rights->banque->consolidate) - { - print ''; - } - else - { - print ''; - } - print ""; - // Transmitter - print ""; + print ""; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '"; + // Bank of cheque + print ""; + if ($user->rights->banque->modifier || $user->rights->banque->consolidate) + { + print ''; + } + else + { + print ''; + } + print ""; + // Date ope print ''; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 817d6dc84e9..a262a63e045 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -1,8 +1,11 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2018 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 @@ -32,16 +35,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("accountancy"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'accountancy', 'compta')); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'bankaccountlist'; // To manage different context of search $search_ref=GETPOST('search_ref','alpha'); $search_label=GETPOST('search_label','alpha'); @@ -51,7 +53,8 @@ $optioncss = GETPOST('optioncss','alpha'); // Security check if ($user->societe_id) $socid=$user->societe_id; -$result=restrictedArea($user,'banque'); +if (! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with list of banks accounting account allowed to manager of chart account +if (! $allowed) $result=restrictedArea($user,'banque'); $diroutputmassaction=$conf->bank->dir_output . '/temp/massgeneration/'.$user->id; @@ -66,11 +69,9 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='b.label'; if (! $sortorder) $sortorder='ASC'; -// Initialize technical object to manage context to save list fields -$contextpage='bankaccountlist'; - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array($contextpage)); +$object = new Account($db); +$hookmanager->initHooks(array('bankaccountlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -89,8 +90,8 @@ $arrayfields=array( 'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1), 'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1), - 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled), - 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled), + 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))), + 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))), 'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1), 'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0), 'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), @@ -228,7 +229,9 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->banque->configurer) { - $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; + $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; + $newcardbutton.= ''; + $newcardbutton.= ''; } @@ -387,7 +390,7 @@ if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titr // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters=array('arrayfields'=>$arrayfields); +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'],$_SERVER["PHP_SELF"],"b.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); @@ -399,7 +402,7 @@ print "\n"; $total = array(); $found = 0; $i=0; $lastcurrencycode=''; -$var=true; + foreach ($accounts as $key=>$type) { if ($i >= $limit) break; @@ -409,7 +412,6 @@ foreach ($accounts as $key=>$type) $obj = new Account($db); $obj->fetch($key); - $var = !$var; $solde = $obj->solde(1); if (! empty($lastcurrencycode) && $lastcurrencycode != $obj->currency_code) @@ -551,7 +553,7 @@ foreach ($accounts as $key=>$type) if (! empty($arrayfields['balance']['checked'])) { print ''; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalbalancefield']=$totalarray['nbfield']; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index a1e69cdc651..1d9d5526700 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories","companies","bills","trips")); $action=GETPOST('action', 'alpha'); @@ -72,7 +73,7 @@ if ($user->rights->banque->consolidate && $action == 'dvprev' && ! empty($dvid)) } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -395,7 +396,6 @@ if (empty($numref)) $result = $db->query($sql); if ($result) { - $var=True; $numrows = $db->num_rows($result); $i = 0; @@ -534,11 +534,10 @@ else $title=$langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); print load_fiche_titre($title, $mesprevnext, 'title_bank.png'); //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'title_bank.png', 0, '', '', 0, 1); - print '
'; print ""; print ''; - print ""; + print ''; print '
'; print '
'; +print ' - - - - - + + + + - - + '; -$var=true; for ($mois = 1 ; $mois < 13 ; $mois++) { diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 56eb8beeca7..72f4bbbd988 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1,12 +1,13 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Vinícius Nogueira * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2018 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 @@ -47,6 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","bills","categories","companies","margins","salaries","loan","donations","trips","members","compta","accountancy")); $id = GETPOST('id','int'); @@ -54,6 +56,7 @@ $ref = GETPOST('ref','alpha'); $action=GETPOST('action','alpha'); $cancel=GETPOST('cancel','alpha'); $confirm=GETPOST('confirm','alpha'); +$contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :'')); @@ -90,7 +93,7 @@ $num_releve=GETPOST("num_releve","alpha"); $cat=GETPOST("cat"); if (empty($dateop)) $dateop=-1; -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -120,10 +123,6 @@ if ($id > 0 || ! empty($ref)) } -// Initialize technical object to manage context to save list fields -$contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id); -//var_dump($contextpage); - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('banktransactionlist', $contextpage)); $extrafields = new ExtraFields($db); @@ -384,7 +383,8 @@ if (dol_strlen($search_dv_start) > 0) $param .= '&search_start_dvmonth=' . GETPO if (dol_strlen($search_dv_end) > 0) $param .= '&search_end_dvmonth=' . GETPOST('search_end_dvmonth', 'int') . '&search_end_dvday=' . GETPOST('search_end_dvday', 'int') . '&search_end_dvyear=' . GETPOST('search_end_dvyear', 'int'); if ($search_req_nb) $param.='&req_nb='.urlencode($search_req_nb); if (GETPOST("search_thirdparty",'int')) $param.='&thirdparty='.urlencode(GETPOST("search_thirdparty",'int')); -if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +if ($action == 'reconcile') $param.='&action=reconcile'; // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -423,19 +423,17 @@ if ($id > 0 || ! empty($ref)) if ($action != 'reconcile') { - //print '
'; - if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate if ($user->rights->banque->consolidate) { - $buttonreconcile = ''.$langs->trans("Conciliate").''; + $newparam = $param; + $newparam = preg_replace('/search_conciliated=\d+/i','',$newparam); + $buttonreconcile = ''.$langs->trans("Conciliate").''; } else { - $buttonreconcile = ''.$langs->trans("Conciliate").''; + $buttonreconcile = ''.$langs->trans("Conciliate").''; } } - - //print '
'; } } else @@ -455,7 +453,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM "; -if ($search_bid) $sql.= MAIN_DB_PREFIX."bank_class as l,"; +if ($search_bid>0) $sql.= MAIN_DB_PREFIX."bank_class as l,"; $sql.= " ".MAIN_DB_PREFIX."bank_account as ba,"; $sql.= " ".MAIN_DB_PREFIX."bank as b"; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_extrafields as ef on (b.rowid = ef.fk_object)"; @@ -726,7 +724,7 @@ if ($resql) // Title $bankcateg=new BankCateg($db); - $addbutton = ''; + $newcardbutton = ''; if ($action != 'addline' && $action != 'reconcile') { if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) @@ -734,27 +732,37 @@ if ($resql) if (! empty($conf->global->BANK_USE_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments { if ($user->rights->banque->modifier) { - $addbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton.= ''; + $newcardbutton.= ''; } else { - $addbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton.= ''; + $newcardbutton.= ''; } } else // If direct entries is not done using miscellaneous payments { if ($user->rights->banque->modifier) { - $addbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton.= ''; + $newcardbutton.= ''; } else { - $addbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton.= ''; + $newcardbutton.= ''; } } } else { - $addbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton.= ''; + $newcardbutton.= ''; } } - $morehtml='
'; + $morehtml='
'; $morehtml.= ' "; // ' Page '; $morehtml.=''; $morehtml.='/'.$nbtotalofpages.' '; @@ -765,7 +773,7 @@ if ($resql) $morehtml.=$buttonreconcile; } - $morehtml.=$addbutton; + $morehtml.=$newcardbutton; $picto='title_bank'; if ($id > 0 || ! empty($ref)) $picto=''; @@ -905,7 +913,7 @@ if ($resql) if (! empty($arrayfields['b.conciliated']['checked'])) { print '
'; } print ''; } - print ''; + } + if (! empty($arrayfields['balance']['checked'])) + { + print ''; + } + + print ''; - print ''; print ''; } @@ -1457,7 +1484,7 @@ if ($resql) elseif ($totalarray['totalcredfield'] == $i) print ''; elseif ($i == $posconciliatecol) { - print ''; } diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 22f7c8c9e79..5e5194d55c8 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -25,8 +25,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); if (!$user->rights->banque->lire) accessforbidden(); diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 15aae28c1d1..280cd9bdbc0 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -27,8 +27,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -70,7 +70,6 @@ if ($result) $num = $db->num_rows($result); $i = 0; $total = 0; $totalnb = 0; - $var=true; while ($i < $num) { $objp = $db->fetch_object($result); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index c43ee812953..db497733863 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -39,6 +39,7 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","bills","categories","companies","compta")); $action = GETPOST('action','aZ09'); @@ -413,7 +414,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit',$parameters); } @@ -803,19 +804,19 @@ else print ''; print ''."\n\n"; - dol_fiche_head(''); + dol_fiche_head(array(), 0, '', 0); - print '
'; + //print '
'; print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 39479ba220b..5381143d8ac 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -36,6 +36,7 @@ global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +// Load translation files required by the page $langs->load("orders"); $total=0; $ilink=0; @@ -47,23 +48,25 @@ foreach($linkedObjectBlock as $key => $objectlink) $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> -
trans("CustomerOrder"); ?>getNomUrl(1); ?>ref_client; ?>date,'day'); ?>" > + trans("CustomerOrder"); ?> + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' + getNomUrl(1); ?>ref_client; ?>date,'day'); ?>rights->commande->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?>getLibStatut(3); ?> + getLibStatut(3); ?> element != 'shipping') { ?> - ">transnoentitiesnoconv("RemoveLink")); ?> + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> @@ -87,4 +90,4 @@ if (count($linkedObjectBlock) > 1) } ?> - \ No newline at end of file + diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index 27a167bc576..5e83b3032c1 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -20,16 +20,11 @@ * \brief File to return Ajax response on payment breakdown process */ -//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'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show 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) require '../main.inc.php'; @@ -66,7 +61,7 @@ foreach ($remains as $key => $value) } // Treatment -$result = $amountPayment != '' ? ($amountPayment - array_sum($amounts)) : ($amountPayment + array_sum($amounts)); // Remaining amountPayment +$result = ($amountPayment != '') ? ($amountPayment - array_sum($amounts)) : array_sum($amounts); // Remaining amountPayment $toJsonArray = array(); $totalRemaining = price2num(array_sum($remains)); $toJsonArray['label'] = $amountPayment == '' ? '' : $langs->transnoentities('RemainingAmountPayment'); diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 3eee68bcb24..a786cf5ca28 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -29,8 +29,8 @@ 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/class/dolgraph.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width',380); // Large for one graph in a smarpthone. $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',160); @@ -200,7 +200,6 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) } print '
'; - print $form->selectyesno('search_conciliated', $search_conciliated, 1, False, 1); + print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1); print ''; @@ -935,7 +943,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields - $parameters=array('arrayfields'=>$arrayfields); + $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print_liste_field_titre('', $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); @@ -993,12 +1001,12 @@ if ($resql) { $tmpnbfieldbeforebalance=0; $tmpnbfieldafterbalance=0; - $balancefieldfound=false; + $balancefieldfound=0; foreach($arrayfields as $key => $val) { if ($key == 'balancebefore' || $key == 'balance') { - $balancefieldfound=true; + $balancefieldfound++; continue; } if (! empty($arrayfields[$key]['checked'])) @@ -1029,10 +1037,29 @@ if ($resql) print ''; print ''; - print price(price2num($balance, 'MT'), 1, $langs); + + if (! empty($arrayfields['balancebefore']['checked'])) + { + print ''; + print price(price2num($balance, 'MT'), 1, $langs); + print ''; + print price(price2num($balance, 'MT'), 1, $langs); + print ''; + print ''; + print ' '; print ''; + print ''; print '
'.price($totalarray['totalcred']).''; + print ''; if ($user->rights->banque->consolidate && $action == 'reconcile') print ''; print '
'; // Ref print ''; - print ''; + print ''; // Label print ''; - print ''; + print ''; // Type print ''; @@ -914,7 +915,7 @@ else $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 83e1f15ef36..be029fcb2f5 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -30,8 +30,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $action=GETPOST('action','aZ09'); @@ -101,11 +101,10 @@ if ($result) $num = $db->num_rows($result); $i = 0; $total = 0; - $var=True; while ($i < $num) { $objp = $db->fetch_object($result); - + print ''; print ''; if (GETPOST('action','aZ09') == 'edit' && GETPOST("categid")== $objp->rowid) @@ -136,7 +135,7 @@ if ($result) */ if ($action != 'edit') { - + print ''; print ''; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 719a48c3e3c..7228214e51c 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -332,7 +332,7 @@ class Account extends CommonObject * @param int $fk_bank To search using bank transaction id * @param int $url_id To search using link to * @param string $type To search using type - * @return array|-1 Array of links or -1 on error + * @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error */ function get_url($fk_bank='', $url_id='', $type='') { @@ -395,9 +395,10 @@ class Account extends CommonObject * @param string $emetteur Name of cheque writer * @param string $banque Bank of cheque writer * @param string $accountancycode When we record a free bank entry, we must provide accounting account if accountancy module is on. + * @param int $datev Date value * @return int Rowid of added entry, <0 if KO */ - function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur='',$banque='', $accountancycode='') + function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur='',$banque='', $accountancycode='', $datev=null) { // Deprecatîon warning if (is_numeric($oper)) { @@ -447,7 +448,7 @@ class Account extends CommonObject $this->db->begin(); - $datev = $date; + if (is_null($datev) || empty($datev)) $datev = $date; $accline = new AccountLine($this->db); $accline->datec = $now; @@ -505,10 +506,12 @@ class Account extends CommonObject * @param int $notrigger 1=Disable triggers * @return int < 0 if KO, > 0 if OK */ - function create(User $user = null, $notrigger=0) + function create(User $user, $notrigger=0) { global $langs,$conf, $hookmanager; + $error=0; + // Clean parameters if (! $this->min_allowed) $this->min_allowed=0; if (! $this->min_desired) $this->min_desired=0; @@ -668,7 +671,7 @@ class Account extends CommonObject * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user = null, $notrigger = 0) + function update(User $user, $notrigger = 0) { global $langs,$conf, $hookmanager; @@ -1135,6 +1138,8 @@ class Account extends CommonObject */ function solde($option=0) { + $solde=0; + $sql = "SELECT sum(amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."bank"; $sql.= " WHERE fk_account = ".$this->id; @@ -1149,8 +1154,13 @@ class Account extends CommonObject $solde = $obj->amount; } $this->db->free($resql); - return $solde; + } else { + $this->errors[]=$this->db->lasterror; + return -1; } + + return $solde; + } /** @@ -1593,7 +1603,7 @@ class Account extends CommonObject $this->code_banque = '123'; $this->code_guichet = '456'; $this->number = 'ABC12345'; - $this->cle_rib = 50; + $this->cle_rib = '50'; $this->bic = 'AA12'; $this->iban = 'FR999999999'; $this->domiciliation = 'My bank address'; @@ -1904,7 +1914,7 @@ class AccountLine extends CommonObject */ function update_conciliation(User $user, $cat) { - global $conf; + global $conf,$langs; $this->db->begin(); @@ -2132,9 +2142,10 @@ class AccountLine extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle * @param string $option Option ('showall') + * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0,$option='') + function getNomUrl($withpicto=0,$maxlen=0,$option='',$notooltip=0) { global $langs; diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 2fca317d1c4..33e74dc3691 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -25,17 +25,14 @@ * \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 . "/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'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'companies', 'other')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); @@ -127,7 +124,7 @@ if ($id > 0 || !empty($ref)) { print '
'.$langs->trans("Ref").'ref).'">
ref).'">
'.$langs->trans("Label").'label).'">
label).'">
'.$langs->trans("AccountType").'
'.$objp->rowid.'
 
'; print ''; - print ''; + print ''; print "
' . $langs->trans("NbOfAttachedFiles") . '' . count($filearray) . '
' . $langs->trans("TotalSizeOfAttachedFiles") . '' . $totalsize . ' ' . $langs->trans("bytes") . '
' . $langs->trans("TotalSizeOfAttachedFiles") . '' .dol_print_size($totalsize,1,1).'
\n"; print ''; diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index a813a71eeca..b829002a990 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -28,8 +28,8 @@ 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/class/dolgraph.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width',768); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',200); diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 832ec95dcd2..ab43b9374aa 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -26,9 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'companies')); $id = GETPOST("rowid"); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index f6740ed6fda..e006f78c6e7 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -32,10 +32,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'compta', 'bills')); if (! empty($conf->adherent->enabled)) $langs->load("members"); if (! empty($conf->don->enabled)) $langs->load("donations"); if (! empty($conf->loan->enabled)) $langs->load("loan"); @@ -437,6 +435,7 @@ if ($result) // Type of payment / Number print "
".$langs->trans("Type")." / ".$langs->trans("Numero"); + print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print "
".$langs->trans("Bank")."'; - print ''; - print ''.$objp->banque.'
".$langs->trans("CheckTransmitter")."
".$langs->trans("CheckTransmitter"); + print ' ('.$langs->trans("ChequeMaker").')'; + print "'; @@ -487,6 +474,22 @@ if ($result) } print "
".$langs->trans("Bank"); + print ' ('.$langs->trans("ChequeBank").')'; + print "'; + print ''; + print ''.$objp->banque.'
'.$langs->trans("DateOperation").'
'; - print ''.price($solde, 0, $langs, 0, 0, -1, $obj->currency_code).''; + print ''.price($solde, 0, $langs, 0, -1, -1, $obj->currency_code).''; print '
'; @@ -573,7 +572,6 @@ else $result = $db->query($sql); if ($result) { - $var=False; $numrows = $db->num_rows($result); $i = 0; @@ -753,7 +751,7 @@ else while ($ii < $numc) { $objc = $db->fetch_object($resc); - print "
$objc->label"; + print "
".$objc->label.""; $ii++; } } @@ -776,7 +774,7 @@ else print '\n"; } - print '\n"; + print '\n"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { @@ -798,8 +796,9 @@ else print "\n".'"; // Line Balance - print "\n"; - print '"; + print "\n"; + print ""; + print '"; print "\n"; print "
 '.price($objp->amount)."'.price($total)."'.price(price2num($total, 'MT'))."
'.$langs->trans("Total")." :".price($totald)."".price($totalc)."  
 ".$langs->trans("EndBankBalance")." :'.price($total)." 
 ".$langs->trans("EndBankBalance")." :'.price(price2num($total, 'MT'))." 
"; print "
"; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 61a4f524a1a..765001e75a5 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -30,6 +30,7 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks", "categories", "multicurrency")); if (! $user->rights->banque->transfer) @@ -49,8 +50,8 @@ if ($action == 'add') $dateo = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int')); $label = GETPOST('label','alpha'); - $amount= GETPOST('amount'); - $amountto= GETPOST('amountto'); + $amount= GETPOST('amount','alpha'); + $amountto= GETPOST('amountto','alpha'); if (! $label) { @@ -125,7 +126,7 @@ if ($action == 'add') if (! $error) { - $mesgs = $langs->trans("TransferFromToDone",''.$accountfrom->label."",''.$accountto->label."",$amount,$langs->transnoentities("Currency".$conf->currency)); + $mesgs = $langs->trans("TransferFromToDone", ''.$accountfrom->label."", ''.$accountto->label."", $amount, $langs->transnoentities("Currency".$conf->currency)); setEventMessages($mesgs, null, 'mesgs'); $db->commit(); } @@ -153,6 +154,12 @@ llxHeader(); print ' '; @@ -210,12 +219,12 @@ $account_to=''; $label=''; $amount=''; -if($error) +if ($error) { $account_from = GETPOST('account_from','int'); $account_to = GETPOST('account_to','int'); $label = GETPOST('label','alpha'); - $amount = GETPOST('amount','int'); + $amount = GETPOST('amount','alpha'); } print load_fiche_titre($langs->trans("MenuBankInternalTransfer"), '', 'title_bank.png'); @@ -246,9 +255,9 @@ print "\n"; print ""; $form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); print "\n"; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; print ""; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 136e352ff00..0fb8880ce87 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies')); // Security check if (isset($_GET["account"]) || isset($_GET["ref"])) @@ -117,8 +115,6 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) print ''.$langs->trans("BankBalance").''; print ''; - $var=true; - // Current balance print ''; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index b6649250e64..1b4d7579892 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -35,6 +35,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); // Get parameters @@ -349,7 +350,7 @@ if ($action == 'create') print '
'; print ''; print '   '; - print ''; + print ''; print '
'; print ''; diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index ff304676686..cf596860a4b 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); $id = GETPOST('id','int'); diff --git a/htdocs/compta/bank/various_payment/index.php b/htdocs/compta/bank/various_payment/index.php index 41c0baa61d5..6535e0c0082 100644 --- a/htdocs/compta/bank/various_payment/index.php +++ b/htdocs/compta/bank/various_payment/index.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","banks","bills","accountancy")); // Security check @@ -38,7 +39,7 @@ $result = restrictedArea($user, 'banque', '', '', ''); $optioncss = GETPOST('optioncss','alpha'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $search_ref = GETPOST('search_ref','int'); $search_user = GETPOST('search_user','alpha'); $search_label = GETPOST('search_label','alpha'); @@ -102,7 +103,7 @@ $sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as $sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number as bank_account_number, ba.fk_accountancy_journal as accountancy_journal, ba.label as blabel,"; $sql.= " pst.code as payment_code"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_various as v"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON v.fk_typepayment = pst.id AND pst.entity IN (" . getEntity('c_paiement').")"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON v.fk_typepayment = pst.id"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON v.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE v.entity IN (".getEntity('payment_various').")"; @@ -137,7 +138,6 @@ if ($result) $num = $db->num_rows($result); $i = 0; $total = 0 ; - $var=true; $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); @@ -153,6 +153,14 @@ if ($result) if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + $newcardbutton=''; + if ($user->rights->banque->modifier) + { + $newcardbutton=''.$langs->trans('MenuNewVariousPayment').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + print '
'; if ($optioncss != '') print ''; @@ -163,7 +171,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("VariousPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans("VariousPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); print '
'; print ''."\n"; diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index f6c7dc063f7..bb66871d6c0 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); $id=GETPOST('id','int'); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 6e765cdacb0..6d369b696b9 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -34,8 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -48,7 +48,7 @@ if (! $year && $mode != 'sconly') { $year=date("Y", time()); } $search_account = GETPOST('search_account','int'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -139,7 +139,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql.= " ".MAIN_DB_PREFIX."chargesociales as cs"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id AND pct.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE cs.fk_type = c.id"; @@ -166,12 +166,10 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $total = 0; $totalnb = 0; $totalpaye = 0; - $var=true; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - $var = !$var; print ''; // Date $date=$obj->periode; @@ -260,7 +258,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $sql.= " FROM ".MAIN_DB_PREFIX."tva as pv"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pv.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pv.fk_typepayment = pct.id AND pct.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pv.fk_typepayment = pct.id"; $sql.= " WHERE pv.entity IN (".getEntity("tax").")"; if ($year > 0) { @@ -417,14 +415,13 @@ while($j<$numlt) print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"pv.datep","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder); print "\n"; - $var=1; + while ($i < $num) { $obj = $db->fetch_object($result); $total = $total + $obj->amount; - print ''; print ''."\n"; @@ -474,7 +471,7 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read) $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON s.fk_typepayment = pct.id AND pct.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON s.fk_typepayment = pct.id"; $sql.= " , ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE s.entity IN (".getEntity('user').")"; $sql.= " AND u.rowid = s.fk_user"; @@ -501,7 +498,7 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read) if (! empty($conf->banque->enabled)) print_liste_field_titre("Account",$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); print "\n"; - $var=1; + while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index c65a7a670ae..aba6460d8e2 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -39,7 +39,7 @@ if ($user->societe_id > 0) if (! $user->rights->facture->lire) accessforbidden(); - +// Load translation files required by the page $langs->load("companies"); $mode=GETPOST("mode"); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 979ef5960e0..05d509e268d 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -33,6 +33,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } +// Load translation files required by the page $langs->load("trips"); diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 1f3974ce041..59d92140c86 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("other"); -$langs->load("trips"); -$langs->load("companies"); -$langs->load("interventions"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'trips', 'companies', 'interventions')); $id = GETPOST('id','int'); $ref = GETPOST('ref', 'alpha'); @@ -115,7 +113,7 @@ if ($object->id) //print ""; print ''; - print ''; + print ''; print '
'.dol_print_date($db->jdate($obj->dm),'day').'
".$langs->trans("Company")."".$object->client->getNomUrl(1)."
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
'; print '
'; diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 2cd3823bacd..a390023e280 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -27,9 +27,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("trips"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid','int'); @@ -45,7 +44,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="d.dated"; -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; /* diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index 1e0279263e3..6a62484323f 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; +// Load translation files required by the page $langs->load("trips"); // Security check diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 807ddfee700..bdbdad0a712 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -30,9 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php' require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("trips"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid','int'); @@ -46,7 +45,7 @@ $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; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; @@ -170,7 +169,6 @@ if ($resql) print ''; print "\n"; - $var=true; while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); @@ -178,7 +176,6 @@ if ($resql) $soc = new Societe($db); if ($obj->socid) $soc->fetch($obj->socid); - print ''; // Id print ''.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.''; diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 36bc107d672..cf652948a6e 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -27,8 +27,8 @@ require '../../../main.inc.php'; 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"); +// Load translation files required by the page +$langs->loadLangs(array('trips', 'companies')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); @@ -294,7 +294,7 @@ print '
'; // Show graphs -print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; + + + if (count($object->tab_next_situation_invoice) > 0) { + // List of next invoices + /*print ''; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print '';*/ + + $total_next_ht = $total_next_ttc = 0; + + 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 ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; + + } + + $total_global_ht += $total_next_ht; + $total_global_ttc += $total_next_ttc; + + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; + } + + print '
'; +print ''; } @@ -2781,7 +3108,7 @@ if ($action == 'create') $parameters = array('objectsrc' => $objectsrc,'colspan' => ' colspan="2"', 'cols'=>2); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -3000,7 +3327,7 @@ else if ($id > 0 || ! empty($ref)) $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%'))"; + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; } @@ -3058,7 +3385,25 @@ else if ($id > 0 || ! empty($ref)) array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', 'no', 1); + } + } + + // Confirmation to remove invoice from cycle + if ($action == 'situationout') { + $text = $langs->trans('ConfirmRemoveSituationFromCycle', $object->ref); + $label = $langs->trans("ConfirmOuting"); + $formquestion = array(); + // remove situation from cycle + if ($object->statut == Facture::STATUS_VALIDATED + && $user->rights->facture->creer + && !$objectidnext + && $object->is_last_in_cycle() + && ((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))) + ) + { + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $label, $text, 'confirm_situationout', $formquestion, "yes", 1); } } @@ -3169,31 +3514,31 @@ else if ($id > 0 || ! empty($ref)) if ($action == 'paid' && $resteapayer > 0) { // Code $i = 0; - $close [$i] ['code'] = 'discount_vat'; // escompte + $close [$i]['code'] = 'discount_vat'; // escompte $i ++; - $close [$i] ['code'] = 'badcustomer'; + $close [$i]['code'] = 'badcustomer'; $i ++; // Help $i = 0; - $close [$i] ['label'] = $langs->trans("HelpEscompte") . '

' . $langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc"); + $close [$i]['label'] = $langs->trans("HelpEscompte") . '

' . $langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc"); $i ++; - $close [$i] ['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); + $close [$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); $i ++; // Texte $i = 0; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close[$i]['label'], 1); $i ++; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close[$i]['label'], 1); $i ++; // arrayreasons[code]=reason foreach ($close as $key => $val) { - $arrayreasons [$close [$key] ['code']] = $close [$key] ['reason']; + $arrayreasons[$close [$key]['code']] = $close[$key]['reason']; } // Cree un tableau formulaire - $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); + $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','morecss' => 'minwidth300')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 310); } // Confirmation du classement abandonne @@ -3222,16 +3567,16 @@ else if ($id > 0 || ! empty($ref)) $arrayreasons [$close [2] ['code']] = $close [2] ['reason']; // Cree un tableau formulaire - $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); + $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','morecss' => 'minwidth300')); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes", 1, 250); } } if ($action == 'deletepaiement') { $payment_id = GETPOST('paiement_id'); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 'no', 1); } @@ -3272,7 +3617,7 @@ else if ($id > 0 || ! empty($ref)) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' ('.$langs->trans("OtherBills").')'; // Project if (! empty($conf->projet->enabled)) @@ -3363,84 +3708,14 @@ else if ($id > 0 || ! empty($ref)) print ''; // Relative and absolute discounts - $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; - $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; - $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; - $viewabsolutediscount = '' . $langs->trans("ViewAvailableGlobalDiscounts") . ''; - print ''; // Date invoice @@ -3613,54 +3888,10 @@ else if ($id > 0 || ! empty($ref)) print ""; print ''; - // Situations - if (! empty($conf->global->INVOICE_USE_SITUATION)) - { - if ($object->type == 5 && ($object->situation_counter > 1)) - { - $prevsits = $object->get_prev_sits(); - print ''; - print ''; - - // Previous situation(s) deduction(s) - for ($i = 0; $i < $cprevsits; $i++) { - print ''; - - print ''; - } - } - } // Incoterms if (!empty($conf->incoterm->enabled)) @@ -3819,88 +4050,129 @@ else if ($id > 0 || ! empty($ref)) if (! empty($conf->incoterm->enabled)) $nbrows += 1; - if ($object->type == Facture::TYPE_SITUATION && ! empty($conf->global->INVOICE_USE_SITUATION)) + // List of previous situation invoices + if (($object->situation_cycle_ref > 0) && ! empty($conf->global->INVOICE_USE_SITUATION)) { - if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) - print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 7e6b069b0d9..2c676e399de 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -29,9 +29,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 76284e7fe73..18aa3c99442 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index d42139e4ec0..2b90ae7fe05 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index cc33b8dc026..97f8b78b195 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadlangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index a08b6663c38..6f66352fe75 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -64,6 +64,7 @@ if (! empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; } +// Load translation files required by the page $langs->loadLangs(array('bills','companies','compta','products','banks','main','withdrawals')); if (! empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); @@ -189,13 +190,16 @@ if (empty($reshook)) $qualified_for_stock_change = $object->hasProductsOrServices(1); } - $result = $object->delete($user, 0, $idwarehouse); - if ($result > 0) { - header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php?restore_lastsearch_values=1'); - exit(); - } else { - setEventMessages($object->error, $object->errors, 'errors'); - $action=''; + if ($object->is_erasable()) + { + $result = $object->delete($user, 0, $idwarehouse); + if ($result > 0) { + header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php?restore_lastsearch_values=1'); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action=''; + } } } @@ -405,7 +409,7 @@ if (empty($reshook)) //var_dump($object->getRemainToPay(0)); //var_dump($discount->amount_ttc);exit; - if ($discount->amount_ttc > $object->getRemainToPay(0)) + if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0))) { // TODO Split the discount in 2 automatically $error++; @@ -553,7 +557,7 @@ if (empty($reshook)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) ) { - $idwarehouse = GETPOST('idwarehouse'); + $idwarehouse = GETPOST('idwarehouse','int'); $object->fetch($id); $object->fetch_thirdparty(); @@ -640,8 +644,8 @@ if (empty($reshook)) else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement) { $object->fetch($id); - $close_code = $_POST["close_code"]; - $close_note = $_POST["close_note"]; + $close_code = GETPOST("close_code",'none'); + $close_note = GETPOST("close_note",'none'); if ($close_code) { $result = $object->set_paid($user, $close_code, $close_note); if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); @@ -651,8 +655,8 @@ if (empty($reshook)) } // Classify "abandoned" else if ($action == 'confirm_canceled' && $confirm == 'yes') { $object->fetch($id); - $close_code = $_POST["close_code"]; - $close_note = $_POST["close_note"]; + $close_code = GETPOST("close_code",'none'); + $close_note = GETPOST("close_note",'none'); if ($close_code) { $result = $object->set_canceled($user, $close_code, $close_note); if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); @@ -716,11 +720,10 @@ if (empty($reshook)) $sql = 'SELECT SUM(pf.amount) as total_paiements'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id AND c.entity IN (' . getEntity('c_paiement') . ')'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql.= ' WHERE pf.fk_facture = '.$object->id; $sql.= ' AND pf.fk_paiement = p.rowid'; $sql.= ' AND p.entity IN (' . getEntity('facture').')'; - $sql.= ' ORDER BY p.datep, p.tms'; $resql = $db->query($sql); if (! $resql) dol_print_error($db); @@ -914,12 +917,21 @@ if (empty($reshook)) $object->fk_facture_source = $sourceinvoice > 0 ? $sourceinvoice : ''; $object->type = Facture::TYPE_CREDIT_NOTE; + $facture_source = new Facture($db); // fetch origin object + if ($facture_source->fetch($object->fk_facture_source)>0) + { + if ($facture_source->type == Facture::TYPE_SITUATION) + { + $object->situation_counter = $facture_source->situation_counter; + $object->situation_cycle_ref = $facture_source->situation_cycle_ref; + $facture_source->fetchPreviousNextSituationInvoice(); + } + } $id = $object->create($user); if (GETPOST('invoiceAvoirWithLines', 'int')==1 && $id>0) { - $facture_source = new Facture($db); // fetch origin object - if ($facture_source->fetch($object->fk_facture_source)>0) + if (!empty($facture_source->lines)) { $fk_parent_line = 0; @@ -936,6 +948,61 @@ if (empty($reshook)) $fk_parent_line = 0; } + + + + if($facture_source->type == Facture::TYPE_SITUATION) + { + + if(!empty($facture_source->tab_previous_situation_invoice)) + { + // search the last invoice in cycle + $lineIndex = count($facture_source->tab_previous_situation_invoice) - 1; + $searchPreviousInvoice = true; + while( $searchPreviousInvoice ) + { + if($facture_source->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_SITUATION || $lineIndex < 1) + { + $searchPreviousInvoice=false; // find, exit; + break; + } + else + { + $lineIndex--; // go to previous invoice in cycle + } + } + + + $maxPrevSituationPercent = 0; + foreach($facture_source->tab_previous_situation_invoice[$lineIndex]->lines as $prevLine) + { + if($prevLine->id == $line->fk_prev_id) + { + $maxPrevSituationPercent = max($maxPrevSituationPercent,$prevLine->situation_percent); + + //$line->subprice = $line->subprice - $prevLine->subprice; + $line->total_ht = $line->total_ht - $prevLine->total_ht; + $line->total_tva = $line->total_tva - $prevLine->total_tva; + $line->total_ttc = $line->total_ttc - $prevLine->total_ttc; + $line->total_localtax1 = $line->total_localtax1 - $prevLine->total_localtax1; + $line->total_localtax2 = $line->total_localtax2 - $prevLine->total_localtax2; + + $line->multicurrency_subprice = $line->multicurrency_subprice - $prevLine->multicurrency_subprice; + $line->multicurrency_total_ht = $line->multicurrency_total_ht - $prevLine->multicurrency_total_ht; + $line->multicurrency_total_tva = $line->multicurrency_total_tva - $prevLine->multicurrency_total_tva; + $line->multicurrency_total_ttc = $line->multicurrency_total_ttc - $prevLine->multicurrency_total_ttc; + + + } + } + + // prorata + $line->situation_percent = $maxPrevSituationPercent - $line->situation_percent; + + + } + } + $line->fk_facture = $object->id; $line->fk_parent_line = $fk_parent_line; @@ -969,7 +1036,6 @@ if (empty($reshook)) if(GETPOST('invoiceAvoirWithPaymentRestAmount', 'int')==1 && $id>0) { - $facture_source = new Facture($db); // fetch origin object if not previously defined if ($facture_source->fetch($object->fk_facture_source)>0) { $totalpaye = $facture_source->getSommePaiement(); @@ -980,6 +1046,18 @@ if (empty($reshook)) $object->addline($langs->trans('invoiceAvoirLineWithPaymentRestAmount'),$remain_to_pay,1,0,0,0,0,0,'','','TTC'); } } + + // Add link between credit note and origin + if(! empty($object->fk_facture_source)) { + $facture_source->fetch($object->fk_facture_source); + $facture_source->fetchObjectLinked(); + + if(! empty($facture_source->linkedObjectsIds)) { + foreach($facture_source->linkedObjectsIds as $sourcetype => $TIds) { + $object->add_object_linked($sourcetype, current($TIds)); + } + } + } } } @@ -1339,7 +1417,13 @@ if (empty($reshook)) $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->situation_percent, $lines[$i]->fk_prev_id, $lines[$i]->fk_unit); + $result = $object->addline( + $desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product, + $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, + 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, + $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, + $lines[$i]->situation_percent, $lines[$i]->fk_prev_id, $lines[$i]->fk_unit + ); if ($result > 0) { $lineid = $result; @@ -1419,6 +1503,7 @@ if (empty($reshook)) } } + // Situation invoices if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations']))) { $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -1444,27 +1529,42 @@ if (empty($reshook)) $object->origin = $origin; $object->origin_id = $originid; - foreach ($object->lines as &$line) + foreach ($object->lines as $i => &$line) { $line->origin = $object->origin; $line->origin_id = $line->id; $line->fetch_optionals($line->id); + + // Si fk_remise_except defini on vérifie si la réduction à déjà été appliquée + if ($line->fk_remise_except) + { + $discount=new DiscountAbsolute($line->db); + $result=$discount->fetch($line->fk_remise_except); + if ($result > 0) + { + // Check if discount not already affected to another invoice + if ($discount->fk_facture_line > 0) + { + $line->fk_remise_except = 0; + } + } + } } } $object->fetch_thirdparty(); $object->date = $datefacture; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim($_POST['note_public']); - $object->note = trim($_POST['note']); - $object->ref_client = $_POST['ref_client']; - $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; - $object->fk_project = $_POST['projectid']; - $object->cond_reglement_id = $_POST['cond_reglement_id']; - $object->mode_reglement_id = $_POST['mode_reglement_id']; - $object->remise_absolue = $_POST['remise_absolue']; - $object->remise_percent = $_POST['remise_percent']; + $object->note_public = trim(GETPOST('note_public','none')); + $object->note = trim(GETPOST('note','none')); + $object->ref_client = GETPOST('ref_client','alpha'); + $object->ref_int = GETPOST('ref_int','alpha'); + $object->modelpdf = GETPOST('model','alpha'); + $object->fk_project = GETPOST('projectid','int'); + $object->cond_reglement_id = GETPOST('cond_reglement_id','int'); + $object->mode_reglement_id = GETPOST('mode_reglement_id','int'); + $object->remise_absolue = GETPOST('remise_absolue','int'); + $object->remise_percent = GETPOST('remise_percent','int'); // Proprietes particulieres a facture de remplacement @@ -1533,14 +1633,14 @@ if (empty($reshook)) // Set if we used free entry or predefined product $predef=''; - $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $product_desc=(GETPOST('dp_desc','none')?GETPOST('dp_desc','none'):''); $price_ht = GETPOST('price_ht'); $price_ht_devise = GETPOST('multicurrency_price_ht'); $prod_entry_mode = GETPOST('prod_entry_mode','alpha'); if ($prod_entry_mode == 'free') { $idprod=0; - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); + $tva_tx = (GETPOST('tva_tx','alpha') ? GETPOST('tva_tx','alpha') : 0); } else { @@ -1717,7 +1817,28 @@ if (empty($reshook)) // If price per quantity and customer elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - // TODO Same than PRODUIT_CUSTOMER_PRICES_BY_QTY but using $object->thirdparty->price_level + if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity + { + // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. + $pqp = GETPOST('pbq','int'); + + // Search price into product_price_by_qty from $prod->id + foreach($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) + { + if ($priceforthequantityarray['rowid'] != $pqp) continue; + // We found the price + if ($priceforthequantityarray['price_base_type'] == 'HT') + { + $pu_ht = $priceforthequantityarray['unitprice']; + } + else + { + $pu_ttc = $priceforthequantityarray['unitprice']; + } + // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. + break; + } + } } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); @@ -1948,7 +2069,25 @@ if (empty($reshook)) $line->fetch(GETPOST('lineid')); $percent = $line->get_prev_progress($object->id); - if (GETPOST('progress') < $percent) + if($object->type == Facture::TYPE_CREDIT_NOTE && $object->situation_cycle_ref>0) + { + // in case of situation credit note + if(GETPOST('progress') >= 0 ) + { + $mesg = $langs->trans("CantBeNullOrPositive"); + setEventMessages($mesg, null, 'warnings'); + $error++; + $result = -1; + } + elseif (GETPOST('progress') < $line->situation_percent) // TODO : use a modified $line->get_prev_progress($object->id) result + { + $mesg = $langs->trans("CantBeLessThanMinPercent"); + setEventMessages($mesg, null, 'warnings'); + $error++; + $result = -1; + } + } + elseif (GETPOST('progress') < $percent) { $mesg = '
' . $langs->trans("CantBeLessThanMinPercent") . '
'; setEventMessages($mesg, null, 'warnings'); @@ -1966,7 +2105,7 @@ if (empty($reshook)) $type = $product->type; $price_min = $product->price_min; - if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->thirdparty->price_level)) + if ((! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_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') : ''); @@ -2094,6 +2233,208 @@ if (empty($reshook)) exit(); } + // Outing situation invoice from cycle + elseif ($action == 'confirm_situationout' && $confirm == 'yes' && $user->rights->facture->creer) + { + $object->fetch($id,'', '','', true); + + if ($object->statut == Facture::STATUS_VALIDATED + && $object->type == Facture::TYPE_SITUATION + && $user->rights->facture->creer + && !$objectidnext + && $object->is_last_in_cycle() + && ((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))) + ) + { + $outingError = 0; + $newCycle = $object->newCycle(); // we need to keep the "situation behavior" so we place it on a new situation cycle + if($newCycle > 1) + { + // Search credit notes + $lastCycle = $object->situation_cycle_ref; + $lastSituationCounter = $object->situation_counter; + $linkedCreditNotesList = array(); + + if (count($object->tab_next_situation_invoice) > 0) { + foreach ($object->tab_next_situation_invoice as $next_invoice) { + if($next_invoice->type == Facture::TYPE_CREDIT_NOTE + && $next_invoice->situation_counter == $object->situation_counter + && $next_invoice->fk_facture_source == $object->id + ) + { + $linkedCreditNotesList[] = $next_invoice->id ; + } + } + } + + $object->situation_cycle_ref = $newCycle; + $object->situation_counter = 1; + $object->situation_final = 0; + if($object->update($user) > 0) + { + $errors = 0; + if(count($linkedCreditNotesList) > 0) + { + // now, credit note must follow + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture '; + $sql.= ' SET situation_cycle_ref='.$newCycle; + $sql.= ' , situation_final=0'; + $sql.= ' , situation_counter='.$object->situation_counter; + $sql.= ' WHERE rowid IN ('.implode(',',$linkedCreditNotesList).')'; + + $resql=$db->query($sql); + if (!$resql) $errors++; + + // Change each progression persent on each lines + foreach($object->lines as $line) + { + + // no traitement for special product + if ($line->product_type == 9 ) continue; + + + if(!empty($object->tab_previous_situation_invoice)) + { + // search the last invoice in cycle + $lineIndex = count($object->tab_previous_situation_invoice) - 1; + $searchPreviousInvoice = true; + while( $searchPreviousInvoice ) + { + if($object->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_SITUATION || $lineIndex < 1) + { + $searchPreviousInvoice=false; // find, exit; + break; + } + else + { + $lineIndex--; // go to previous invoice in cycle + } + } + + + $maxPrevSituationPercent = 0; + foreach($object->tab_previous_situation_invoice[$lineIndex]->lines as $prevLine) + { + if($prevLine->id == $line->fk_prev_id) + { + $maxPrevSituationPercent = max($maxPrevSituationPercent,$prevLine->situation_percent); + } + } + + + $line->situation_percent = $line->situation_percent - $maxPrevSituationPercent; + + if($line->update()<0) $errors++; + + } + } + } + + if (!$errors) + { + setEventMessages($langs->trans('Updated'), '', 'mesgs'); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + } + else + { + setEventMessages($langs->trans('ErrorOutingSituationInvoiceCreditNote'), array(), 'errors'); + } + } + else + { + setEventMessages($langs->trans('ErrorOutingSituationInvoiceOnUpdate'), array(), 'errors'); + } + } + else + { + setEventMessages($langs->trans('ErrorFindNextSituationInvoice'), array(), 'errors'); + } + } + } + + // add lines from objectlinked + elseif($action == 'import_lines_from_object' + && $user->rights->facture->creer + && $object->statut == Facture::STATUS_DRAFT + && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION)) + { + $fromElement = GETPOST('fromelement'); + $fromElementid = GETPOST('fromelementid'); + $importLines = GETPOST('line_checkbox'); + + if(!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) + { + if($fromElement == 'commande') + { + dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); + $lineClassName = 'OrderLine'; + } + elseif($fromElement == 'propal') + { + dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); + $lineClassName = 'PropaleLigne'; + } + $nextRang = count($object->lines) + 1; + $importCount = 0; + $error = 0; + foreach($importLines as $lineId) + { + $lineId = intval($lineId); + $originLine = new $lineClassName($db); + if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0) + { + $originLine->fetch_optionals($lineId); + $desc = $originLine->desc; + $pu_ht = $originLine->subprice; + $qty = $originLine->qty; + $txtva = $originLine->tva_tx; + $txlocaltax1 = $originLine->localtax1_tx; + $txlocaltax2 = $originLine->localtax2_tx; + $fk_product = $originLine->fk_product; + $remise_percent = $originLine->remise_percent; + $date_start = $originLine->date_start; + $date_end = $originLine->date_end; + $ventil = 0; + $info_bits = $originLine->info_bits; + $fk_remise_except = $originLine->fk_remise_except; + $price_base_type='HT'; + $pu_ttc=0; + $type = $originLine->product_type; + $rang=$nextRang++; + $special_code = $originLine->special_code; + $origin = $originLine->element; + $origin_id = $originLine->id; + $fk_parent_line=0; + $fk_fournprice=$originLine->fk_fournprice; + $pa_ht = $originLine->pa_ht; + $label = $originLine->label; + $array_options = $originLine->array_options; + $situation_percent = 100; + $fk_prev_id = ''; + $fk_unit = $originLine->fk_unit; + $pu_ht_devise = $originLine->multicurrency_subprice; + + $res = $object->addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $ventil, $info_bits, $fk_remise_except, $price_base_type, $pu_ttc, $type, $rang, $special_code, $origin, $origin_id, $fk_parent_line, $fk_fournprice, $pa_ht, $label, $array_options, $situation_percent, $fk_prev_id, $fk_unit,$pu_ht_devise); + + if($res > 0){ + $importCount++; + }else{ + $error++; + } + } + else{ + $error++; + } + } + + if($error) + { + setEventMessage($langs->trans('ErrorsOnXLines',$error), 'errors'); + } + } + } + // Actions when printing a doc from card include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; @@ -2119,22 +2460,15 @@ if (empty($reshook)) $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute','none')); if ($ret < 0) $error++; - if (! $error) { - // Actions on extra fields (by external module or standard code) - // TODO le hook fait double emploi avec le trigger !! - $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 - if (empty($reshook)) { - $result = $object->insertExtraFields('BILL_MODIFY'); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } else if ($reshook < 0) - $error ++; + if (! $error) + { + // Actions on extra fields + $result = $object->insertExtraFields('BILL_MODIFY'); + if ($result < 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } } if ($error) @@ -2699,19 +3033,12 @@ if ($action == 'create') { // Discounts for third party print '
' . $langs->trans('Discounts') . ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", '' . $soc->remise_percent . ''); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); - print ' (' . $langs->trans("EditRelativeDiscount") . ')'; - print '. '; - print '
'; - if ($absolute_discount) - print $langs->trans("CompanyHasAbsoluteDiscount", '' . price($absolute_discount) . '', $langs->trans("Currency" . $conf->currency)); - else - print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print ' (' . $langs->trans("EditGlobalDiscounts") . ')'; - print '.'; + + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print '
' . $langs->trans('Discounts'); - print ''; - if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else - print $langs->trans("CompanyHasNoRelativeDiscount"); - // print ' ('.$addrelativediscount.')'; - // Is there is commercial discount or down payment available ? - if ($absolute_discount > 0) { - print '. '; - if ($object->statut > 0 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { - if ($object->statut == 0) { - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); - print '. '; - } else { - if ($object->statut < 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { - $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); - print '
' . $text . '.
'; - } else { - $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); - $text2 = $langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text, $text2); - } - } - } else { - // Discount available of type fixed amount (not credit note) - print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' (' . $addabsolutediscount . ')'); - } - } else { - if ($absolute_creditnote > 0) // If not, link will be added later - { - if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT) - print ' (' . $addabsolutediscount . ')
'; - else - print '. '; - } else - print '. '; - } - // Is there credit notes availables ? - if ($absolute_creditnote > 0) - { - // If validated, we show link "add credit note to payment" - if ($object->statut != Facture::STATUS_VALIDATED || $object->type == Facture::TYPE_CREDIT_NOTE) { - if ($object->statut == 0 && $object->type != Facture::TYPE_DEPOSIT) { - $text = $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)); - print $form->textwithpicto($text, $langs->trans("CreditNoteDepositUse")); - } else { - print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '.'; - } - } else { // We can add a credit note on a down payment or standard invoice or situation invoice - // There is credit notes discounts available - if (! $absolute_discount) print '
'; - // $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); - $more=' ('.$addcreditnote. (($addcreditnote && $viewabsolutediscount) ? ' - ' : '') . $viewabsolutediscount . ')'; - $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0, $more); // We allow credit note even if amount is higher - } - } - if (! $absolute_discount && ! $absolute_creditnote) { - print $langs->trans("CompanyHasNoAbsoluteDiscount"); - if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT) - print ' (' . $addabsolutediscount . ')
'; - else - print '. '; - } - // if ($object->statut == 0 && $object->type != 2 && $object->type != 3) - // { - // if (! $absolute_discount && ! $absolute_creditnote) print '
'; - // print '   -   '; - // print $addabsolutediscount; - // print '   -   '.$addcreditnote; // We disbale link to credit note - // } + print '
'; + $thirdparty = $soc; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?facid=' . $object->id); + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print '
'; - print $langs->trans('SituationAmount'); - print ' '; - print $prevsits[0]->situation_counter; - $cprevsits = count($prevsits); - for ($i = 1; $i < $cprevsits; $i++) { - print ' + '; - print $prevsits[$i]->situation_counter; - } - print ' + '; - print $object->situation_counter; - print ''; - $prevsits_total_amount = 0; - foreach ($prevsits as $situation) { - $prevsits_total_amount += $situation->total_ht; - } - $prevsits_total_amount += $object->total_ht; - - print price($prevsits_total_amount, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) ); - - print '
'; - print ''; - print $langs->trans('SituationDeduction'); - print ' '; - print $prevsits[$i]->situation_counter; - print ''; - print '- ' . price($prevsits[$i]->total_ht, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) ); - 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 ''; + print '
' . $langs->trans('ListOfPreviousSituationInvoices') . '' . $langs->trans('AmountHT') . '' . $langs->trans('AmountTTC') . ' 
'; - $total_prev_ht = $total_prev_ttc = 0; - 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 ''; - } + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - if (! empty($conf->banque->enabled)) 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_prev_ht = $total_prev_ttc = 0; + $total_global_ht = $total_global_ttc = 0; - $total_next_ht = $total_next_ttc = 0; + if (count($object->tab_previous_situation_invoice) > 0) { + // List of previous invoices - 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 ''; + $current_situation_counter = array(); + 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; + $current_situation_counter[] = (($prev_invoice->type == Facture::TYPE_CREDIT_NOTE)?-1:1) * $prev_invoice->situation_counter; + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; + } + } - } - print ''; - print ''; - if (! empty($conf->banque->enabled)) print ''; + $total_global_ht += $total_prev_ht ; + $total_global_ttc += $total_prev_ttc ; + $total_global_ht += $object->total_ht; + $total_global_ttc += $object->total_ttc; + $current_situation_counter[] = (($object->type == Facture::TYPE_CREDIT_NOTE)?-1:1) * $object->situation_counter; + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; - } - if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) - print '
' . $prev_invoice->getNomUrl(1) . '' . price($prev_invoice->total_ht) . '' . price($prev_invoice->total_ttc) . '' . $prev_invoice->getLibStatut(3, $totalpaye) . '
' . $langs->trans('ListOfSituationInvoices') . '' . $langs->trans('Situation') . '' . $langs->trans('AmountHT') . '' . $langs->trans('AmountTTC') . ' 
' . 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) . '
' . $prev_invoice->getNomUrl(1) . ''.(($prev_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $prev_invoice->situation_counter.'' . price($prev_invoice->total_ht) . '' . price($prev_invoice->total_ttc) . '' . $prev_invoice->getLibStatut(3, $totalpaye) . '
' . $object->getNomUrl(1) . ''.(($object->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $object->situation_counter.'' . price($object->total_ht) . '' . price($object->total_ttc) . '' . $object->getLibStatut(3, $object->getSommePaiement()) . '
' . price($total_next_ht) . '' . price($total_next_ttc) . ' 
'; + print '
' . $langs->trans('CurrentSituationTotal') . ''; + $i =0; + foreach ($current_situation_counter as $sit) + { + $curSign = $sit>0?'+':'-'; + $curType = $sit>0?$langs->trans('situationInvoiceShortcode_S'):$langs->trans('situationInvoiceShortcode_AS'); + if($i>0) print ' '.$curSign.' '; + print $curType . abs($sit); + $i++; + } + print '' . price($total_global_ht) . '' . price($total_global_ttc) . ' 
' . $langs->trans('ListOfNextSituationInvoices') . '' . $langs->trans('AmountHT') . '' . $langs->trans('AmountTTC') . ' 
' . $next_invoice->getNomUrl(1) . ''.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $next_invoice->situation_counter.'' . price($next_invoice->total_ht) . '' . price($next_invoice->total_ttc) . '' . $next_invoice->getLibStatut(3, $totalpaye) . '
' . price($total_global_ht) . '' . price($total_global_ttc) . ' 
'; } @@ -4050,7 +4322,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { print ''; print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } @@ -4058,7 +4330,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { print ''; print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; // $resteapayeraffiche=0; $cssforamountpaymentcomplete = ''; } @@ -4066,7 +4338,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { print ''; print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } @@ -4077,7 +4349,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->close_note) $text .= '

' . $langs->trans("Reason") . ':' . $object->close_note; print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } @@ -4232,7 +4504,7 @@ else if ($id > 0 || ! empty($ref)) // Form to add new line if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline' && ($object->is_first() || !$object->situation_cycle_ref)) { - if ($action != 'editline') + if ($action != 'editline' && $action != 'selectlines') { // Add free products/services $object->formAddObjectLine(1, $mysoc, $soc); @@ -4274,7 +4546,7 @@ else if ($id > 0 || ! empty($ref)) 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))) { - print ''; + print ''; } else { print '
' . $langs->trans('Modify') . '
'; } @@ -4303,7 +4575,7 @@ else if ($id > 0 || ! empty($ref)) { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { - print ''; + print ''; } else { print '
' . $langs->trans('ReOpen') . '
'; } @@ -4314,19 +4586,19 @@ else if ($id > 0 || ! empty($ref)) 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->validate))) { - print ''; + print ''; } } // Send by mail if (($object->statut == Facture::STATUS_VALIDATED || $object->statut == Facture::STATUS_CLOSED) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($objectidnext) { - print '
' . $langs->trans('SendByMail') . '
'; + print '
' . $langs->trans('SendMail') . '
'; } else { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { - print ''; + print ''; } else - print ''; + print ''; } } @@ -4386,16 +4658,16 @@ else if ($id > 0 || ! empty($ref)) // For standard invoice with excess received if ($object->type == Facture::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $user->rights->facture->creer && empty($discount->id)) { - print ''; + print ''; } // For credit note if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) { - print ''; + print ''; } // For deposit invoice if ($object->type == Facture::TYPE_DEPOSIT && $user->rights->facture->creer && empty($discount->id)) { - print ''; + print ''; } } @@ -4404,7 +4676,7 @@ else if ($id > 0 || ! empty($ref)) || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $user->rights->facture->paiement && empty($discount->id)) ) { - print ''; + print ''; } // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) @@ -4414,7 +4686,7 @@ else if ($id > 0 || ! empty($ref)) if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice - print ''; + print ''; } else { @@ -4426,7 +4698,7 @@ else if ($id > 0 || ! empty($ref)) } else { - print ''; + print ''; } } } @@ -4435,7 +4707,7 @@ else if ($id > 0 || ! empty($ref)) // Clone if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $user->rights->facture->creer) { - print ''; + print ''; } // Clone as predefined / Create template @@ -4456,6 +4728,45 @@ else if ($id > 0 || ! empty($ref)) } } + // For situation invoice with excess received + if ($object->statut == Facture::STATUS_VALIDATED + && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) > 0 + && $user->rights->facture->creer + && !$objectidnext + && $object->is_last_in_cycle() + && $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE + ) + { + 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))) + { + print ''; + } else { + print '
' . $langs->trans("CreateCreditNote") . '
'; + } + } + + // remove situation from cycle + if ($object->statut == Facture::STATUS_VALIDATED + && $object->type == Facture::TYPE_SITUATION + && $user->rights->facture->creer + && !$objectidnext + && $object->situation_counter > 1 + && $object->is_last_in_cycle() + && ((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))) + ) + { + if(($object->total_ttc - $totalcreditnotes ) == 0 ) + { + print ''; + } + else + { + print ''; + } + } + // Create next situation invoice if ($user->rights->facture->creer && ($object->type == 5) && ($object->statut == 1 || $object->statut == 2)) { if ($object->is_last_in_cycle() && $object->situation_final != 1) { @@ -4494,7 +4805,7 @@ else if ($id > 0 || ! empty($ref)) } else { - print ''; + print ''; } } else { print ''; @@ -4524,7 +4835,15 @@ else if ($id > 0 || ! empty($ref)) // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('invoice')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + $compatibleImportElementsList = false; + if($user->rights->facture->creer + && $object->statut == Facture::STATUS_DRAFT + && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION) ) + { + $compatibleImportElementsList = array('commande','propal'); // import from linked elements + } + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem,$compatibleImportElementsList); // Show online payment link diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index c1f8774095a..7012b0ef800 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -81,6 +81,9 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + // Add external contacts ids + $this->invoice->contacts_ids = $this->invoice->liste_contact(-1,'external',1); + $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); } @@ -176,6 +179,9 @@ class Invoices extends DolibarrApi $invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed(); $invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT'); + // Add external contacts ids + $invoice_static->contacts_ids = $invoice_static->liste_contact(-1,'external',1); + $obj_ret[] = $this->_cleanObjectDatas($invoice_static); } $i++; @@ -196,7 +202,7 @@ class Invoices extends DolibarrApi * @param array $request_data Request datas * @return int ID of invoice */ - function post($request_data = NULL) + function post($request_data = null) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401, "Insuffisant rights"); @@ -313,7 +319,7 @@ class Invoices extends DolibarrApi * @throws 401 * @throws 404 */ - function putLine($id, $lineid, $request_data = NULL) { + function putLine($id, $lineid, $request_data = null) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); } @@ -414,7 +420,7 @@ class Invoices extends DolibarrApi * @param array $request_data Datas * @return int */ - function put($id, $request_data = NULL) + function put($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -485,7 +491,13 @@ class Invoices extends DolibarrApi /** * Add a line to a given invoice * - * Exemple of POST query : { "desc": "Desc", "subprice": "1.00000000", "qty": "1", "tva_tx": "20.000", "localtax1_tx": "0.000", "localtax2_tx": "0.000", "fk_product": "1", "remise_percent": "0", "date_start": "", "date_end": "", "fk_code_ventilation": 0, "info_bits": "0", "fk_remise_except": null, "product_type": "1", "rang": "-1", "special_code": "0", "fk_parent_line": null, "fk_fournprice": null, "pa_ht": "0.00000000", "label": "", "array_options": [], "situation_percent": "100", "fk_prev_id": null, "fk_unit": null } + * Exemple of POST query : + * { + * "desc": "Desc", "subprice": "1.00000000", "qty": "1", "tva_tx": "20.000", "localtax1_tx": "0.000", "localtax2_tx": "0.000", + * "fk_product": "1", "remise_percent": "0", "date_start": "", "date_end": "", "fk_code_ventilation": 0, "info_bits": "0", + * "fk_remise_except": null, "product_type": "1", "rang": "-1", "special_code": "0", "fk_parent_line": null, "fk_fournprice": null, + * "pa_ht": "0.00000000", "label": "", "array_options": [], "situation_percent": "100", "fk_prev_id": null, "fk_unit": null + * } * * @param int $id Id of invoice * @param array $request_data InvoiceLine data @@ -499,7 +511,7 @@ class Invoices extends DolibarrApi * @throws 404 * @throws 400 */ - function postLine($id, $request_data = NULL) { + function postLine($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); } @@ -562,6 +574,59 @@ class Invoices extends DolibarrApi return $updateRes; } + /** + * Adds a contact to an invoice + * + * @param int $id Order ID + * @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link + * @param string $type_contact Type of contact (code). Must a code found into table llx_c_type_contact. For example: BILLING + * @param string $source external=Contact extern (llx_socpeople), internal=Contact intern (llx_user) + * @param int $notrigger Disable all triggers + * + * @url POST {id}/contacts + * + * @return array + * + * @throws 200 + * @throws 304 + * @throws 401 + * @throws 404 + * @throws 500 + * + */ + function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger=0) + { + if(! DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } + $result = $this->invoice->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Invoice not found'); + } + + if( ! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->invoice->add_contact($fk_socpeople,$type_contact,$source,$notrigger); + if ($result < 0) { + throw new RestException(500, 'Error : '.$this->invoice->error); + } + + $result = $this->invoice->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Invoice not found'); + } + + if( ! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + return $this->_cleanObjectDatas($this->invoice); + } + + + /** * Sets an invoice as draft * @@ -899,14 +964,13 @@ class Invoices extends DolibarrApi return $result; } - /** - * Add payment line to a specific invoice - * - * The model schema is defined by the PaymentData class. + + /** + * Add payment line to a specific invoice with the remain to pay as amount. * * @param int $id Id of invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} + * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param int $paiementid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} * @param string $num_paiement {@from body} Payment number (optional) @@ -922,61 +986,194 @@ class Invoices extends DolibarrApi * @throws 404 */ function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') { + global $conf; + + require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; + + if(! DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(403); + } + if(empty($id)) { + throw new RestException(400, 'Invoice ID is mandatory'); + } + + if( ! DolibarrApi::_checkAccessToResource('facture',$id)) { + throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if (! empty($conf->banque->enabled)) { + if(empty($accountid)) { + throw new RestException(400, 'Account ID is mandatory'); + } + } + + if(empty($paiementid)) { + throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + } + + + $result = $this->invoice->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Invoice not found'); + } + + // Calculate amount to pay + $totalpaye = $this->invoice->getSommePaiement(); + $totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); + $totaldeposits = $this->invoice->getSumDepositsUsed(); + $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + + $this->db->begin(); + + $amounts = array(); + $multicurrency_amounts = array(); + + // Clean parameters amount if payment is for a credit note + if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { + $resteapayer = price2num($resteapayer,'MT'); + $amounts[$id] = -$resteapayer; + // Multicurrency + $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); + $multicurrency_amounts[$id] = -$newvalue; + } else { + $resteapayer = price2num($resteapayer,'MT'); + $amounts[$id] = $resteapayer; + // Multicurrency + $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); + $multicurrency_amounts[$id] = $newvalue; + } + + + // Creation of payment line + $paiement = new Paiement($this->db); + $paiement->datepaye = $datepaye; + $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id + $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paiement->paiementid = $paiementid; + $paiement->paiementcode = dol_getIdFromCode($this->db,$paiementid,'c_paiement','id','code',1); + $paiement->num_paiement = $num_paiement; + $paiement->note = $comment; + + $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices=='yes'?1:0)); // This include closing invoices + if ($paiement_id < 0) + { + $this->db->rollback(); + throw new RestException(400, 'Payment error : '.$paiement->error); + } + + if (! empty($conf->banque->enabled)) { + $label='(CustomerInvoicePayment)'; + + if($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { + throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); + } + if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) $label='(CustomerInvoicePaymentBack)'; // Refund of a credit note + $result=$paiement->addPaymentToBank(DolibarrApiAccess::$user,'payment',$label,$accountid,$chqemetteur,$chqbank); + if ($result < 0) + { + $this->db->rollback(); + throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + } + } + + $this->db->commit(); + + return $paiement_id; + } + + /** + * Add a payment to pay partially or completely one or several invoices. + * Warning: Take care that all invoices are owned by the same customer. + * Example of value for parameter arrayofamounts: {"1": "99.99", "2": "10"} + * + * @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice + * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param int $paiementid {@from body} Payment mode Id {@min 1} + * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} + * @param int $accountid {@from body} Account Id {@min 1} + * @param string $num_paiement {@from body} Payment number (optional) + * @param string $comment {@from body} Note (optional) + * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') + * @param string $chqbank {@from body} Issuer bank name (optional) + * + * @url POST /paymentsdistributed + * + * @return int Payment ID + * @throws 400 + * @throws 401 + * @throws 403 + * @throws 404 + */ + function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') + { global $conf; require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; if(! DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); + throw new RestException(403); } - if(empty($id)) { - throw new RestException(400, 'Invoice ID is mandatory'); + foreach($arrayofamounts as $id => $amount) { + if(empty($id)) { + throw new RestException(400, 'Invoice ID is mandatory. Fill the invoice id and amount into arrayofamounts parameter. For example: {"1": "99.99", "2": "10"}'); + } + if( ! DolibarrApi::_checkAccessToResource('facture',$id)) { + throw new RestException(403, 'Access not allowed on invoice ID '.$id.' for login '.DolibarrApiAccess::$user->login); + } } - if( ! DolibarrApi::_checkAccessToResource('facture',$id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $request_data = (object) $payment_data; - if (! empty($conf->banque->enabled)) { - if(empty($accountid)) { - throw new RestException(400, 'Account ID is mandatory'); - } + if(empty($accountid)) { + throw new RestException(400, 'Account ID is mandatory'); + } } - if(empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); } - - $result = $this->invoice->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Invoice not found'); - } - - // Calculate amount to pay - $totalpaye = $this->invoice->getSommePaiement(); - $totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); - $totaldeposits = $this->invoice->getSumDepositsUsed(); - $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); - $this->db->begin(); - // Clean parameters amount if payment is for a credit note - if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { - $resteapayer = price2num($resteapayer,'MT'); - $amounts[$id] = -$resteapayer; - // Multicurrency - $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); - $multicurrency_amounts[$id] = -$newvalue; - } else { - $resteapayer = price2num($resteapayer,'MT'); - $amounts[$id] = $resteapayer; - // Multicurrency - $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); - $multicurrency_amounts[$id] = $newvalue; - } + $amounts = array(); + $multicurrency_amounts = array(); + + // Loop on each invoice to pay + foreach($arrayofamounts as $id => $amount) + { + $result = $this->invoice->fetch($id); + if( ! $result ) { + $this->db->rollback(); + throw new RestException(404, 'Invoice ID '.$id.' not found'); + } + + // Calculate amount to pay + $totalpaye = $this->invoice->getSommePaiement(); + $totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); + $totaldeposits = $this->invoice->getSumDepositsUsed(); + $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + if ($amount != 'remain') + { + if ($amount > $resteapayer) + { + $this->db->rollback(); + throw new RestException(400, 'Payment amount on invoice ID '.$id.' ('.$amount.') is higher than remain to pay ('.$resteapayer.')'); + } + $resteapayer = $amount; + } + // Clean parameters amount if payment is for a credit note + if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { + $resteapayer = price2num($resteapayer,'MT'); + $amounts[$id] = -$resteapayer; + // Multicurrency + $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); + $multicurrency_amounts[$id] = -$newvalue; + } else { + $resteapayer = price2num($resteapayer,'MT'); + $amounts[$id] = $resteapayer; + // Multicurrency + $newvalue = price2num($this->invoice->multicurrency_total_ttc,'MT'); + $multicurrency_amounts[$id] = $newvalue; + } + } // Creation of payment line $paiement = new Paiement($this->db); @@ -987,17 +1184,14 @@ class Invoices extends DolibarrApi $paiement->paiementcode = dol_getIdFromCode($this->db,$paiementid,'c_paiement','id','code',1); $paiement->num_paiement = $num_paiement; $paiement->note = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices=='yes'?1:0)); // This include closing invoices if ($paiement_id < 0) { $this->db->rollback(); throw new RestException(400, 'Payment error : '.$paiement->error); } - if (! empty($conf->banque->enabled)) { $label='(CustomerInvoicePayment)'; - if($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); } @@ -1009,7 +1203,9 @@ class Invoices extends DolibarrApi throw new RestException(400, 'Add payment to bank error : '.$paiement->error); } } + $this->db->commit(); + return $paiement_id; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index f45a0a46ede..4d102e73377 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -68,6 +68,13 @@ class FactureRec extends CommonInvoice var $usenewprice=0; + var $suspended; // status + + const STATUS_NOTSUSPENDED = 0; + const STATUS_SUSPENDED = 1; + + + /** * Constructor * @@ -95,12 +102,13 @@ class FactureRec extends CommonInvoice // Clean parameters $this->titre=trim($this->titre); $this->usenewprice=empty($this->usenewprice)?0:$this->usenewprice; + if (empty($this->suspended)) $this->suspended=0; // No frequency defined then no next date to execution if (empty($this->frequency)) { $this->frequency=0; - $this->date_when=NULL; + $this->date_when=null; } @@ -147,6 +155,7 @@ class FactureRec extends CommonInvoice $sql.= ", fk_multicurrency"; $sql.= ", multicurrency_code"; $sql.= ", multicurrency_tx"; + $sql.= ", suspended"; $sql.= ") VALUES ("; $sql.= "'".$this->db->escape($this->titre)."'"; $sql.= ", ".$facsrc->socid; @@ -167,13 +176,14 @@ class FactureRec extends CommonInvoice $sql.= ", '".$this->db->escape($this->unit_frequency)."'"; $sql.= ", ".(!empty($this->date_when)?"'".$this->db->idate($this->date_when)."'":'NULL'); $sql.= ", ".(!empty($this->date_last_gen)?"'".$this->db->idate($this->date_last_gen)."'":'NULL'); - $sql.= ", ".$this->nb_gen_done; - $sql.= ", ".$this->nb_gen_max; - $sql.= ", ".$this->auto_validate; - $sql.= ", ".$this->generate_pdf; - $sql.= ", ".$facsrc->fk_multicurrency; - $sql.= ", '".$facsrc->multicurrency_code."'"; - $sql.= ", ".$facsrc->multicurrency_tx; + $sql.= ", ".$this->db->escape($this->nb_gen_done); + $sql.= ", ".$this->db->escape($this->nb_gen_max); + $sql.= ", ".$this->db->escape($this->auto_validate); + $sql.= ", ".$this->db->escape($this->generate_pdf); + $sql.= ", ".$this->db->escape($facsrc->fk_multicurrency); + $sql.= ", '".$this->db->escape($facsrc->multicurrency_code)."'"; + $sql.= ", ".$this->db->escape($facsrc->multicurrency_tx); + $sql.= ", ".$this->db->escape($this->suspended); $sql.= ")"; if ($this->db->query($sql)) @@ -304,8 +314,8 @@ class FactureRec extends CommonInvoice $sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; //$sql.= ', el.fk_source'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_rec as f'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid AND c.entity IN ('.getEntity('c_payment_term').')'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id AND p.entity IN ('.getEntity('c_paiement').')'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid'; + $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.entity IN ('.getEntity('facture').')'; if ($rowid) $sql.= ' AND f.rowid='.$rowid; @@ -439,7 +449,7 @@ class FactureRec extends CommonInvoice $sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx, '; $sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise, l.remise_percent, l.subprice,'; - $sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_ttc,'; + $sql.= ' l.info_bits, l.date_start_fill, l.date_end_fill, l.total_ht, l.total_tva, l.total_ttc,'; //$sql.= ' l.situation_percent, l.fk_prev_id,'; //$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,'; $sql.= ' l.rang, l.special_code,'; @@ -465,7 +475,6 @@ class FactureRec extends CommonInvoice $line->id = $objp->rowid; $line->rowid = $objp->rowid; - $line->label = $objp->custom_label; // Label line $line->desc = $objp->description; // Description line $line->description = $objp->description; // Description line $line->product_type = $objp->product_type; // Type of line @@ -478,6 +487,8 @@ class FactureRec extends CommonInvoice $line->qty = $objp->qty; $line->subprice = $objp->subprice; + $line->label = $objp->custom_label; // @deprecated + $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; @@ -487,6 +498,8 @@ class FactureRec extends CommonInvoice $line->remise_percent = $objp->remise_percent; $line->fk_remise_except = $objp->fk_remise_except; $line->fk_product = $objp->fk_product; + $line->date_start_fill = $objp->date_start_fill; + $line->date_end_fill = $objp->date_end_fill; $line->info_bits = $objp->info_bits; $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; @@ -602,15 +615,17 @@ class FactureRec extends CommonInvoice * @param string $label Label of the line * @param string $fk_unit Unit * @param double $pu_ht_devise Unit price in currency + * @param int $date_start_fill 1=Flag to fill start date when generating invoice + * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $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, $pu_ht_devise=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $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, $pu_ht_devise=0, $date_start_fill=0, $date_end_fill=0) { global $mysoc; $facid=$this->id; - dol_syslog(get_class($this)."::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,txlocaltax1=$txlocaltax1,txlocaltax2=$txlocaltax2,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,type=$type,fk_unit=$fk_unit,pu_ht_devise=$pu_ht_devise", LOG_DEBUG); + dol_syslog(get_class($this)."::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,txlocaltax1=$txlocaltax1,txlocaltax2=$txlocaltax2,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,type=$type,fk_unit=$fk_unit,pu_ht_devise=$pu_ht_devise,date_start_fill=$date_start_fill,date_end_fill=$date_end_fill", LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Check parameters @@ -700,6 +715,8 @@ class FactureRec extends CommonInvoice $sql.= ", total_localtax1"; $sql.= ", total_localtax2"; $sql.= ", total_ttc"; + $sql.= ", date_start_fill"; + $sql.= ", date_end_fill"; $sql.= ", info_bits"; $sql.= ", rang"; $sql.= ", special_code"; @@ -727,6 +744,8 @@ class FactureRec extends CommonInvoice $sql.= ", ".price2num($total_localtax1); $sql.= ", ".price2num($total_localtax2); $sql.= ", ".price2num($total_ttc); + $sql.= ", ".(int) $date_start_fill; + $sql.= ", ".(int) $date_end_fill; $sql.= ", ".$info_bits; $sql.= ", ".$rang; $sql.= ", ".$special_code; @@ -778,9 +797,11 @@ class FactureRec extends CommonInvoice * @param string $fk_unit Unit * @param double $pu_ht_devise Unit price in currency * @param int $notrigger disable line update trigger + * @param int $date_start_fill 1=Flag to fill start date when generating invoice + * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $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, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $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, $pu_ht_devise = 0, $notrigger=0, $date_start_fill=0, $date_end_fill=0) { global $mysoc; @@ -883,6 +904,8 @@ class FactureRec extends CommonInvoice $sql.= ", total_localtax1='".price2num($total_localtax1)."'"; $sql.= ", total_localtax2='".price2num($total_localtax2)."'"; $sql.= ", total_ttc='".price2num($total_ttc)."'"; + $sql.= ", date_start_fill=".((int) $date_start_fill); + $sql.= ", date_end_fill=".((int) $date_end_fill); $sql.= ", info_bits=".$info_bits; $sql.= ", rang=".$rang; $sql.= ", special_code=".$special_code; @@ -948,14 +971,18 @@ class FactureRec extends CommonInvoice * Create all recurrents invoices (for all entities if multicompany is used). * A result may also be provided into this->output. * - * WARNING: This method change context $conf->entity to be in correct context for each recurring invoice found. + * WARNING: This method change temporarly context $conf->entity to be in correct context for each recurring invoice found. * - * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) + * @param int $restictoninvoiceid 0=All qualified template invoices found. > 0 = restrict action on invoice ID + * @param int $forcevalidation 1=Force validation of invoice whatever is template auto_validate flag. + * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function createRecurringInvoices() + function createRecurringInvoices($restictoninvoiceid=0, $forcevalidation=0) { global $conf, $langs, $db, $user; + $error=0; + $langs->load("bills"); $nb_create=0; @@ -964,12 +991,15 @@ class FactureRec extends CommonInvoice $tmparray=dol_getdate($now); $today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day - dol_syslog("createRecurringInvoices"); + dol_syslog("createRecurringInvoices restictoninvoiceid=".$restictoninvoiceid." forcevalidation=".$forcevalidation); + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec'; $sql.= ' WHERE frequency > 0'; // A recurring invoice is an invoice with a frequency $sql.= " AND (date_when IS NULL OR date_when <= '".$db->idate($today)."')"; $sql.= ' AND (nb_gen_done < nb_gen_max OR nb_gen_max = 0)'; $sql.= ' AND suspended = 0'; + $sql.= ' AND entity = '.$conf->entity; // MUST STAY = $conf->entity here + if ($restictoninvoiceid > 0) $sql.=' AND rowid = '.$restictoninvoiceid; $sql.= $db->order('entity', 'ASC'); //print $sql;exit; @@ -984,58 +1014,68 @@ class FactureRec extends CommonInvoice $saventity = $conf->entity; - while ($i < $num) // Loop on each template invoice + while ($i < $num) // Loop on each template invoice. If $num = 0, test is false at first pass. { - $line = $db->fetch_object($resql); + $line = $db->fetch_object($resql); $db->begin(); - $facturerec = new FactureRec($db); + $invoiceidgenerated = 0; + + $facturerec = new FactureRec($db); $facturerec->fetch($line->rowid); - // Set entity context - $conf->entity = $facturerec->entity; + if ($facturerec->id > 0) + { + // Set entity context + $conf->entity = $facturerec->entity; - dol_syslog("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref.", entity=".$facturerec->entity); + dol_syslog("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref.", entity=".$facturerec->entity); - $error=0; + $facture = new Facture($db); + $facture->fac_rec = $facturerec->id; // We will create $facture from this recurring invoice + $facture->fk_fac_rec_source = $facturerec->id; // We will create $facture from this recurring invoice - $facture = new Facture($db); - $facture->fac_rec = $facturerec->id; // We will create $facture from this recurring invoice - $facture->fk_fac_rec_source = $facturerec->id; // We will create $facture from this recurring invoice + $facture->type = self::TYPE_STANDARD; + $facture->brouillon = 1; + $facture->date = (empty($facturerec->date_when)?$now:$facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. + $facture->socid = $facturerec->socid; - $facture->type = self::TYPE_STANDARD; - $facture->brouillon = 1; - $facture->date = (empty($facturerec->date_when)?$now:$facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. - $facture->socid = $facturerec->socid; - - $invoiceidgenerated = $facture->create($user); - if ($invoiceidgenerated <= 0) - { - $this->errors = $facture->errors; - $this->error = $facture->error; - $error++; - } - if (! $error && $facturerec->auto_validate) - { - $result = $facture->validate($user); - if ($result <= 0) - { - $this->errors = $facture->errors; - $this->error = $facture->error; - $error++; - } - } - if (! $error && $facturerec->generate_pdf) - { - $result = $facture->generateDocument($facturerec->modelpdf, $langs); - if ($result <= 0) - { - $this->errors = $facture->errors; - $this->error = $facture->error; - $error++; - } - } + $invoiceidgenerated = $facture->create($user); + if ($invoiceidgenerated <= 0) + { + $this->errors = $facture->errors; + $this->error = $facture->error; + $error++; + } + if (! $error && ($facturerec->auto_validate || $forcevalidation)) + { + $result = $facture->validate($user); + if ($result <= 0) + { + $this->errors = $facture->errors; + $this->error = $facture->error; + $error++; + } + } + if (! $error && $facturerec->generate_pdf) + { + $result = $facture->generateDocument($facturerec->modelpdf, $langs); + if ($result <= 0) + { + $this->errors = $facture->errors; + $this->error = $facture->error; + $error++; + } + } + } + else + { + $error++; + $this->error="Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity."\n"; + $this->errors[]="Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity; + dol_syslog("createRecurringInvoices Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity); + } if (! $error && $invoiceidgenerated >= 0) { @@ -1137,49 +1177,69 @@ class FactureRec extends CommonInvoice $prefix=''; if ($recur) { - if ($status == 1) return $langs->trans('Disabled'); // credit note + if ($status == self::STATUS_SUSPENDED) return $langs->trans('Disabled'); else return $langs->trans('Active'); } - else return $langs->trans("Draft"); + else + { + if ($status == self::STATUS_SUSPENDED) return $langs->trans('Disabled'); + else return $langs->trans("Draft"); + } } if ($mode == 1) { $prefix='Short'; if ($recur) { - if ($status == 1) return $langs->trans('Disabled'); + if ($status == self::STATUS_SUSPENDED) return $langs->trans('Disabled'); else return $langs->trans('Active'); } - else return $langs->trans("Draft"); + else + { + if ($status == self::STATUS_SUSPENDED) return $langs->trans('Disabled'); + else return $langs->trans("Draft"); + } } if ($mode == 2) { if ($recur) { - if ($status == 1) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); else return img_picto($langs->trans('Active'),'statut4').' '.$langs->trans('Active'); } - else return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft'); + else + { + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); + else return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft'); + } } if ($mode == 3) { if ($recur) { $prefix='Short'; - if ($status == 1) return img_picto($langs->trans('Disabled'),'statut6'); + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6'); else return img_picto($langs->trans('Active'),'statut4'); } - else return img_picto($langs->trans('Draft'),'statut0'); + else + { + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6'); + else return img_picto($langs->trans('Draft'),'statut0'); + } } if ($mode == 4) { $prefix=''; if ($recur) { - if ($status == 1) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); else return img_picto($langs->trans('Active'),'statut4').' '.$langs->trans('Active'); } - else return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft'); + else + { + if ($status == self::STATUS_SUSPENDED) return img_picto($langs->trans('Disabled'),'statut6').' '.$langs->trans('Disabled'); + else return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft'); + } } if ($mode == 5 || $mode == 6) { @@ -1187,10 +1247,14 @@ class FactureRec extends CommonInvoice if ($mode == 5) $prefix='Short'; if ($recur) { - if ($status == 1) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut6'); + if ($status == self::STATUS_SUSPENDED) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut6'); else return ''.$langs->trans('Active').' '.img_picto($langs->trans('Active'),'statut4'); } - else return $langs->trans('Draft').' '.img_picto($langs->trans('Active'),'statut0'); + else + { + if ($status == self::STATUS_SUSPENDED) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut6'); + else return $langs->trans('Draft').' '.img_picto($langs->trans('Active'),'statut0'); + } } } @@ -1457,7 +1521,7 @@ class FactureRec extends CommonInvoice } /** - * Update the auto validate invoice + * Update the auto validate flag of invoice * * @param int $validate 0 to create in draft, 1 to create and validate invoice * @return int <0 if KO, >0 if OK @@ -1561,6 +1625,10 @@ class FactureLigneRec extends CommonInvoiceLine public $element='facturedetrec'; public $table_element='facturedet_rec'; + var $date_start_fill; + var $date_end_fill; + + /** * Delete line in database * @@ -1615,7 +1683,7 @@ class FactureLigneRec extends CommonInvoiceLine { $sql = 'SELECT l.rowid, l.fk_facture ,l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,'; $sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise, l.remise_percent, l.subprice,'; - $sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_ttc,'; + $sql.= ' l.date_start_fill, l.date_end_fill, l.info_bits, l.total_ht, l.total_tva, l.total_ttc,'; $sql.= ' l.rang, l.special_code,'; $sql.= ' l.fk_unit, l.fk_contract_line,'; $sql.= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc'; @@ -1655,6 +1723,8 @@ class FactureLigneRec extends CommonInvoiceLine $this->remise_percent = $objp->remise_percent; $this->fk_remise_except = $objp->fk_remise_except; $this->fk_product = $objp->fk_product; + $this->date_start_fill = $objp->date_start_fill; + $this->date_end_fill = $objp->date_end_fill; $this->info_bits = $objp->info_bits; $this->total_ht = $objp->total_ht; $this->total_tva = $objp->total_tva; @@ -1680,22 +1750,17 @@ class FactureLigneRec extends CommonInvoiceLine /** * Update a line to invoice_rec. * + * @param User $user User + * @param int $notrigger No trigger * @return int <0 if KO, Id of line if OK */ - function update() + function update(User $user, $notrigger=0) { - global $user; + global $conf; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - if ($fk_product) - { - $product=new Product($this->db); - $result=$product->fetch($fk_product); - $product_type=$product->type; - } - - $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet_rec SET "; + $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet_rec SET"; $sql.= " fk_facture = ".$this->fk_facture; $sql.= ", label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null"); $sql.= ", description='".$this->db->escape($this->desc)."'"; @@ -1711,16 +1776,21 @@ class FactureLigneRec extends CommonInvoiceLine $sql.= ", product_type=".$this->product_type; $sql.= ", remise_percent='".price2num($this->remise_percent)."'"; $sql.= ", subprice='".price2num($this->subprice)."'"; - $sql.= ", total_ht='".price2num($this->total_ht)."'"; - $sql.= ", total_tva='".price2num($this->total_tva)."'"; - $sql.= ", total_localtax1='".price2num($this->total_localtax1)."'"; - $sql.= ", total_localtax2='".price2num($this->total_localtax2)."'"; - $sql.= ", total_ttc='".price2num($this->total_ttc)."'"; + $sql.= ", info_bits='".price2num($this->info_bits)."'"; + $sql.= ", date_start_fill=".(int) $this->date_start_fill; + $sql.= ", date_end_fill=".(int) $this->date_end_fill; + if (empty($this->skip_update_total)) + { + $sql.= ", total_ht=".price2num($this->total_ht); + $sql.= ", total_tva=".price2num($this->total_tva); + $sql.= ", total_localtax1=".price2num($this->total_localtax1); + $sql.= ", total_localtax2=".price2num($this->total_localtax2); + $sql.= ", total_ttc=".price2num($this->total_ttc); + } $sql.= ", rang=".$this->rang; $sql.= ", special_code=".$this->special_code; $sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit )."'":"null"); $sql.= ", fk_contract_line=".($this->fk_contract_line?$this->fk_contract_line:"null"); - $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::updateline", LOG_DEBUG); @@ -1736,10 +1806,10 @@ class FactureLigneRec extends CommonInvoiceLine } } - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger - $result=$this->call_trigger('LINEBILL_REC_UPDATE',$user); + $result=$this->call_trigger('LINEBILL_REC_UPDATE', $user); if ($result < 0) { $this->db->rollback(); @@ -1752,7 +1822,7 @@ class FactureLigneRec extends CommonInvoiceLine } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); $this->db->rollback(); return -2; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7c49ff909d6..b7d86cf630a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -13,8 +13,10 @@ * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2013 Cedric Gross - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -43,6 +45,9 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/margin/lib/margins.lib.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; + /** * Class to manage invoices */ @@ -140,7 +145,7 @@ class Facture extends CommonInvoice public $situation_counter; /** - * @var bool Final situation flag + * @var int Final situation flag */ public $situation_final; @@ -287,6 +292,10 @@ class Facture extends CommonInvoice $this->db->begin(); + $originaldatewhen=null; + $nextdatewhen=null; + $previousdaynextdatewhen=null; + // Create invoice from a template invoice if ($this->fac_rec > 0) { @@ -297,19 +306,22 @@ class Facture extends CommonInvoice $result=$_facrec->fetch($this->fac_rec); $result=$_facrec->fetchObjectLinked(); // This load $_facrec->linkedObjectsIds + // Define some dates $originaldatewhen = $_facrec->date_when; + $nextdatewhen=dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency); + $previousdaynextdatewhen=dol_time_plus_duree($nextdatewhen, -1, 'd'); $this->socid = $_facrec->socid; // Invoice created on same thirdparty than template $this->entity = $_facrec->entity; // Invoice created in same entity than template // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI - $this->fk_project = GETPOST('projectid','int') > 0 ? GETPOST('projectid','int') : $_facrec->fk_project; + $this->fk_project = GETPOST('projectid','int') > 0 ? ((int) GETPOST('projectid','int')) : $_facrec->fk_project; $this->note_public = GETPOST('note_public','none') ? GETPOST('note_public','none') : $_facrec->note_public; $this->note_private = GETPOST('note_private','none') ? GETPOST('note_private','none') : $_facrec->note_private; - $this->modelpdf = GETPOST('model') ? GETPOST('model') : $_facrec->modelpdf; - $this->cond_reglement_id = GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $_facrec->cond_reglement_id; - $this->mode_reglement_id = GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $_facrec->mode_reglement_id; - $this->fk_account = GETPOST('fk_account') > 0 ? GETPOST('fk_account') : $_facrec->fk_account; + $this->modelpdf = GETPOST('model','alpha') ? GETPOST('model','apha') : $_facrec->modelpdf; + $this->cond_reglement_id = GETPOST('cond_reglement_id','int') > 0 ? ((int) GETPOST('cond_reglement_id','int')) : $_facrec->cond_reglement_id; + $this->mode_reglement_id = GETPOST('mode_reglement_id','int') > 0 ? ((int) GETPOST('mode_reglement_id','int')) : $_facrec->mode_reglement_id; + $this->fk_account = GETPOST('fk_account') > 0 ? ((int) GETPOST('fk_account')) : $_facrec->fk_account; // Set here to have this defined for substitution into notes, should be recalculated after adding lines to get same result $this->total_ht = $_facrec->total_ht; @@ -374,7 +386,8 @@ class Facture extends CommonInvoice $substitutionarray['__INVOICE_NEXT_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y'); // Only for tempalte invoice $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = dol_print_date($originaldatewhen, 'dayhour'); - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date(dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency), 'dayhour'); + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($nextdatewhen, 'dayhour'); + $substitutionarray['__INVOICE_PREVIOUS_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($previousdaynextdatewhen, 'dayhour'); //var_dump($substitutionarray);exit; @@ -494,6 +507,7 @@ class Facture extends CommonInvoice } } + // Propagate contacts if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object { $originforcontact = $this->origin; @@ -531,11 +545,10 @@ class Facture extends CommonInvoice else dol_print_error($resqlcontact); } - /* - * Insert lines of invoices into database + * Insert lines of invoices, if not from template invoice, into database */ - if (count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode) + if (! $error && empty($this->fac_rec) && count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode) { $fk_parent_line = 0; @@ -545,9 +558,18 @@ class Facture extends CommonInvoice $newinvoiceline=$this->lines[$i]; $newinvoiceline->fk_facture=$this->id; - // TODO This seems not used. Here we put origin 'facture' but after, we put an id of object ! - $newinvoiceline->origin = $this->element; - $newinvoiceline->origin_id = $this->lines[$i]->id; + $newinvoiceline->origin = $this->lines[$i]->element; + $newinvoiceline->origin_id = $this->lines[$i]->id; + + // Auto set date of service ? + if ($this->lines[$i]->date_start_fill == 1 && $originaldatewhen) // $originaldatewhen is defined when generating from recurring invoice only + { + $newinvoiceline->date_start = $originaldatewhen; + } + if ($this->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen) // $previousdaynextdatewhen is defined when generating from recurring invoice only + { + $newinvoiceline->date_end = $previousdaynextdatewhen; + } if ($result >= 0) { @@ -581,7 +603,7 @@ class Facture extends CommonInvoice } } } - else // If this->lines is an array of invoice line arrays + elseif (! $error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays { $fk_parent_line = 0; @@ -592,7 +614,7 @@ class Facture extends CommonInvoice $line = $this->lines[$i]; // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array - //if (! is_object($line)) $line=json_decode(json_encode($line), FALSE); // convert recursively array into object. + //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. if (! is_object($line)) $line = (object) $line; if ($result >= 0) @@ -689,7 +711,9 @@ class Facture extends CommonInvoice $localtax2_tx, $_facrec->lines[$i]->fk_product, $_facrec->lines[$i]->remise_percent, - '','',0, + ($_facrec->lines[$i]->date_start_fill == 1 && $originaldatewhen)?$originaldatewhen:'', + ($_facrec->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen)?$previousdaynextdatewhen:'', + 0, $tva_npr, '', 'HT', @@ -727,29 +751,20 @@ class Facture extends CommonInvoice { $action='create'; - // Actions on extra fields (by external module or standard code) - // TODO le hook fait double emploi avec le trigger !! - /* - $hookmanager->initHooks(array('invoicedao')); - $parameters=array('invoiceid'=>$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 - {*/ + // Actions on extra fields if (! $error) { $result=$this->insertExtraFields(); if ($result < 0) $error++; } - /*} - } - else if ($reshook < 0) $error++;*/ - // Call trigger - $result=$this->call_trigger('BILL_CREATE',$user); - if ($result < 0) $error++; - // End call triggers + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('BILL_CREATE',$user); + if ($result < 0) $error++; + // End call triggers + } if (! $error) { @@ -860,7 +875,7 @@ class Facture extends CommonInvoice } elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) { - $this->fetchObjectLinked('', '', $object->id, 'facture'); + $this->fetchObjectLinked('', '', $facture->id, 'facture'); foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object) { @@ -1137,7 +1152,7 @@ class Facture extends CommonInvoice { global $langs, $conf, $user, $form; - if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips $result=''; @@ -1256,8 +1271,8 @@ class Facture extends CommonInvoice $sql.= ', f.fk_incoterms, f.location_incoterms'; $sql.= ", i.libelle as libelle_incoterms"; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid AND c.entity IN (' . getEntity('c_payment_term').')'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id AND p.entity IN ('.getEntity('c_paiement').')'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON f.fk_incoterms = i.rowid'; $sql.= ' WHERE f.entity IN ('.getEntity('facture').')'; if ($rowid) $sql.= " AND f.rowid=".$rowid; @@ -1335,7 +1350,7 @@ class Facture extends CommonInvoice $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - if ($this->type == self::TYPE_SITUATION && $fetch_situation) + if (($this->type == self::TYPE_SITUATION || ($this->type == self::TYPE_CREDIT_NOTE && $this->situation_cycle_ref > 0)) && $fetch_situation) { $this->fetchPreviousNextSituationInvoice(); } @@ -1457,6 +1472,9 @@ class Facture extends CommonInvoice $line->fk_prev_id = $objp->fk_prev_id; $line->fk_unit = $objp->fk_unit; + // Accountancy + $line->fk_accounting_account = $objp->fk_code_ventilation; + // Multicurrency $line->fk_multicurrency = $objp->fk_multicurrency; $line->multicurrency_code = $objp->multicurrency_code; @@ -1504,8 +1522,16 @@ class Facture extends CommonInvoice $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; + if ($objp->situation_counter < $this->situation_counter + || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes + ) + { + $this->tab_previous_situation_invoice[] = $invoice; + } + else + { + $this->tab_next_situation_invoice[] = $invoice; + } } } } @@ -1519,7 +1545,7 @@ class Facture extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update(User $user, $notrigger=0) { $error=0; @@ -1535,36 +1561,24 @@ class Facture extends CommonInvoice if (isset($this->note_public)) $this->note_public=trim($this->note_public); if (isset($this->modelpdf)) $this->modelpdf=trim($this->modelpdf); if (isset($this->import_key)) $this->import_key=trim($this->import_key); - if (empty($this->situation_cycle_ref)) { - $this->situation_cycle_ref = 'null'; - } - - if (empty($this->situation_counter)) { - $this->situation_counter = 'null'; - } - - if (empty($this->situation_final)) { - $this->situation_final = '0'; - } // Check parameters // Put here code to add control on parameters values // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."facture SET"; - $sql.= " facnumber=".(isset($this->ref)?"'".$this->db->escape($this->ref)."'":"null").","; - $sql.= " type=".(isset($this->type)?$this->type:"null").","; + $sql.= " type=".(isset($this->type)?$this->db->escape($this->type):"null").","; $sql.= " ref_client=".(isset($this->ref_client)?"'".$this->db->escape($this->ref_client)."'":"null").","; $sql.= " increment=".(isset($this->increment)?"'".$this->db->escape($this->increment)."'":"null").","; - $sql.= " fk_soc=".(isset($this->socid)?$this->socid:"null").","; + $sql.= " fk_soc=".(isset($this->socid)?$this->db->escape($this->socid):"null").","; $sql.= " datec=".(strval($this->date_creation)!='' ? "'".$this->db->idate($this->date_creation)."'" : 'null').","; $sql.= " datef=".(strval($this->date)!='' ? "'".$this->db->idate($this->date)."'" : 'null').","; $sql.= " date_pointoftax=".(strval($this->date_pointoftax)!='' ? "'".$this->db->idate($this->date_pointoftax)."'" : 'null').","; $sql.= " date_valid=".(strval($this->date_validation)!='' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; - $sql.= " paye=".(isset($this->paye)?$this->paye:"null").","; - $sql.= " remise_percent=".(isset($this->remise_percent)?$this->remise_percent:"null").","; - $sql.= " remise_absolue=".(isset($this->remise_absolue)?$this->remise_absolue:"null").","; + $sql.= " paye=".(isset($this->paye)?$this->db->escape($this->paye):"null").","; + $sql.= " remise_percent=".(isset($this->remise_percent)?$this->db->escape($this->remise_percent):"null").","; + $sql.= " remise_absolue=".(isset($this->remise_absolue)?$this->db->escape($this->remise_absolue):"null").","; $sql.= " close_code=".(isset($this->close_code)?"'".$this->db->escape($this->close_code)."'":"null").","; $sql.= " close_note=".(isset($this->close_note)?"'".$this->db->escape($this->close_note)."'":"null").","; $sql.= " tva=".(isset($this->total_tva)?$this->total_tva:"null").","; @@ -1572,23 +1586,22 @@ class Facture extends CommonInvoice $sql.= " localtax2=".(isset($this->total_localtax2)?$this->total_localtax2:"null").","; $sql.= " total=".(isset($this->total_ht)?$this->total_ht:"null").","; $sql.= " total_ttc=".(isset($this->total_ttc)?$this->total_ttc:"null").","; - $sql.= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '')?$this->revenuestamp:"null").","; - $sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").","; - $sql.= " fk_user_author=".(isset($this->user_author)?$this->user_author:"null").","; - $sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").","; - $sql.= " fk_facture_source=".(isset($this->fk_facture_source)?$this->fk_facture_source:"null").","; - $sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").","; - $sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").","; - $sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").","; + $sql.= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '')?$this->db->escape($this->revenuestamp):"null").","; + $sql.= " fk_statut=".(isset($this->statut)?$this->db->escape($this->statut):"null").","; + $sql.= " fk_user_author=".(isset($this->user_author)?$this->db->escape($this->user_author):"null").","; + $sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->db->escape($this->fk_user_valid):"null").","; + $sql.= " fk_facture_source=".(isset($this->fk_facture_source)?$this->db->escape($this->fk_facture_source):"null").","; + $sql.= " fk_projet=".(isset($this->fk_project)?$this->db->escape($this->fk_project):"null").","; + $sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->db->escape($this->cond_reglement_id):"null").","; + $sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->db->escape($this->mode_reglement_id):"null").","; $sql.= " date_lim_reglement=".(strval($this->date_lim_reglement)!='' ? "'".$this->db->idate($this->date_lim_reglement)."'" : 'null').","; $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.= " model_pdf=".(isset($this->modelpdf)?"'".$this->db->escape($this->modelpdf)."'":"null").","; - $sql.= " import_key=".(isset($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null"); - $sql.= ", situation_cycle_ref=".$this->situation_cycle_ref; - $sql.= ", situation_counter=".$this->situation_counter; - $sql.= ", situation_final=".$this->situation_final; - + $sql.= " import_key=".(isset($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null").","; + $sql.= " situation_cycle_ref=".(empty($this->situation_cycle_ref)?"null":$this->db->escape($this->situation_cycle_ref)).","; + $sql.= " situation_counter=".(empty($this->situation_counter)?"null":$this->db->escape($this->situation_counter)).","; + $sql.= " situation_final=".(empty($this->situation_counter)?"0":$this->db->escape($this->situation_counter)); $sql.= " WHERE rowid=".$this->id; $this->db->begin(); @@ -1810,9 +1823,9 @@ class Facture extends CommonInvoice dol_syslog(get_class($this)."::delete rowid=".$rowid.", ref=".$this->ref.", thirdparty=".$this->thirdparty->name, LOG_DEBUG); // Test to avoid invoice deletion (allowed if draft) - $test = $this->is_erasable(); + $result = $this->is_erasable(); - if ($test <= 0) return 0; + if ($result <= 0) return 0; $error=0; @@ -1980,6 +1993,7 @@ class Facture extends CommonInvoice $this->db->begin(); dol_syslog(get_class($this)."::set_paid rowid=".$this->id, LOG_DEBUG); + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture SET'; $sql.= ' fk_statut='.self::STATUS_CLOSED; if (! $close_code) $sql.= ', paye=1'; @@ -1987,7 +2001,6 @@ class Facture extends CommonInvoice if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'"; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::set_paid", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -2359,7 +2372,7 @@ class Facture extends CommonInvoice if (!empty($conf->global->INVOICE_USE_SITUATION)) { - $final = True; + $final = true; $nboflines = count($this->lines); while (($i < $nboflines) && $final) { $final = ($this->lines[$i]->situation_percent == 100); @@ -2533,8 +2546,8 @@ class Facture extends CommonInvoice * @param double $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @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 - * @param int $date_end Date end of service + * @param int $date_start Date start of service + * @param int $date_end Date end of service * @param int $ventil Code of dispatching into accountancy * @param int $info_bits Bits de type de lignes * @param int $fk_remise_except Id discount used @@ -2556,11 +2569,12 @@ class Facture extends CommonInvoice * @param double $pu_ht_devise Unit price in currency * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id='', $fk_unit = null, $pu_ht_devise = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id=0, $fk_unit = null, $pu_ht_devise = 0) { // Deprecation warning if ($label) { dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING); + //var_dump(debug_backtrace(false));exit; } global $mysoc, $conf, $langs; @@ -2594,6 +2608,7 @@ class Facture extends CommonInvoice $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu_ht=price2num($pu_ht); + $pu_ht_devise=price2num($pu_ht_devise); $pu_ttc=price2num($pu_ttc); $pa_ht=price2num($pa_ht); $txtva=price2num($txtva); @@ -2726,14 +2741,15 @@ class Facture extends CommonInvoice // Mise a jour informations denormalisees au niveau de la facture meme $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(); - return $this->line->rowid; + return $this->line->id; } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); $this->db->rollback(); return -1; } @@ -2817,6 +2833,7 @@ class Facture extends CommonInvoice $remise_percent = price2num($remise_percent); $qty = price2num($qty); $pu = price2num($pu); + $pu_ht_devise = price2num($pu_ht_devise); $pa_ht = price2num($pa_ht); $txtva = price2num($txtva); $txlocaltax1 = price2num($txlocaltax1); @@ -3061,7 +3078,7 @@ class Facture extends CommonInvoice // For triggers $result = $line->fetch($rowid); - if (! ($result > 0)) dol_print_error($db, $line->error, $line->errors); + if (! ($result > 0)) dol_print_error($this->db, $line->error, $line->errors); if ($line->delete($user) > 0) { @@ -3487,6 +3504,7 @@ class Facture extends CommonInvoice $return = array(); + $sql = "SELECT f.rowid as rowid, f.facnumber, f.fk_statut, f.type, f.paye, pf.fk_paiement"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture"; @@ -3498,6 +3516,23 @@ class Facture extends CommonInvoice // $sql.= " OR f.close_code IS NOT NULL)"; // Classee payee partiellement $sql.= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de remplacement $sql.= " AND f.type != ".self::TYPE_CREDIT_NOTE; // Type non 2 si facture non avoir + + if($conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE){ + // Select the last situation invoice + $sqlSit = 'SELECT MAX(fs.rowid)'; + $sqlSit.= " FROM ".MAIN_DB_PREFIX."facture as fs"; + $sqlSit.= " WHERE fs.entity = ".$conf->entity; + $sqlSit.= " AND fs.type = ".self::TYPE_SITUATION; + $sqlSit.= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; + $sqlSit.= " GROUP BY fs.situation_cycle_ref"; + $sqlSit.= " ORDER BY fs.situation_counter"; + $sql.= " AND ( f.type != ".self::TYPE_SITUATION . " OR f.rowid IN (".$sqlSit.") )"; // Type non 5 si facture non avoir + } + else + { + $sql.= " AND f.type != ".self::TYPE_SITUATION ; // Type non 5 si facture non avoir + } + if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid; $sql.= " ORDER BY f.facnumber"; @@ -3967,9 +4002,10 @@ class Facture extends CommonInvoice * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref + * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) { global $conf,$langs; @@ -3988,7 +4024,7 @@ class Facture extends CommonInvoice $modelpath = "core/modules/facture/doc/"; - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } /** @@ -4379,7 +4415,7 @@ class FactureLigne extends CommonInvoiceLine if (empty($this->subprice)) $this->subprice=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_prev_id)) $this->fk_prev_id = 'null'; + if (empty($this->fk_prev_id)) $this->fk_prev_id = 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; @@ -4462,7 +4498,7 @@ class FactureLigne extends CommonInvoiceLine $sql.= " ".price2num($this->total_localtax1).","; $sql.= " ".price2num($this->total_localtax2); $sql.= ", " . $this->situation_percent; - $sql.= ", " . $this->fk_prev_id; + $sql.= ", " . (!empty($this->fk_prev_id)?$this->fk_prev_id:"null"); $sql.= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); $sql.= ", ".$user->id; $sql.= ", ".$user->id; @@ -4478,11 +4514,11 @@ class FactureLigne extends CommonInvoiceLine $resql=$this->db->query($sql); if ($resql) { - $this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'facturedet'); + $this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.'facturedet'); + $this->rowid=$this->id; // For backward compatibility if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { - $this->id=$this->rowid; $result=$this->insertExtraFields(); if ($result < 0) { @@ -4554,12 +4590,12 @@ class FactureLigne extends CommonInvoiceLine } $this->db->commit(); - return $this->rowid; + return $this->id; } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); $this->db->rollback(); return -2; } @@ -4642,11 +4678,11 @@ class FactureLigne extends CommonInvoiceLine $sql.= ", special_code='".$this->db->escape($this->special_code)."'"; 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.= ", 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->db->escape($this->fk_fournprice)."'":"null"); $sql.= ", buy_price_ht='".price2num($this->pa_ht)."'"; @@ -4678,7 +4714,7 @@ class FactureLigne extends CommonInvoiceLine } } - if (! $notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('LINEBILL_UPDATE',$user); @@ -4739,6 +4775,7 @@ class FactureLigne extends CommonInvoiceLine /** * Mise a jour en base des champs total_xxx de ligne de facture + * TODO What is goal of this method ? * * @return int <0 if KO, >0 if OK */ diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index bc13b0d5876..3697a61672b 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -57,7 +57,6 @@ class PaymentTerm // extends CommonObject function __construct($db) { $this->db = $db; - return 1; } @@ -90,7 +89,6 @@ class PaymentTerm // extends CommonObject // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_payment_term("; - $sql.= "rowid,"; $sql.= "entity,"; $sql.= "code,"; $sql.= "sortorder,"; @@ -101,7 +99,6 @@ class PaymentTerm // extends CommonObject $sql.= "nbjour,"; $sql.= "decalage"; $sql.= ") VALUES ("; - $sql.= " ".(! isset($this->rowid)?'NULL':"'".$this->db->escape($this->rowid)."'").","; $sql.= " ".(! isset($this->entity)?getEntity('c_payment_term'):"'".$this->db->escape($this->entity)."'").","; $sql.= " ".(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").","; $sql.= " ".(! isset($this->sortorder)?'NULL':"'".$this->db->escape($this->sortorder)."'").","; @@ -181,7 +178,6 @@ class PaymentTerm // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; $sql.= " WHERE t.rowid = ".$id; - $sql.= " AND t.entity = " . getEntity('c_payment_term'); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); @@ -221,36 +217,36 @@ class PaymentTerm // extends CommonObject * * @return int <0 if KO, >0 if OK */ - function getDefaultId() - { - global $langs; + function getDefaultId() + { + global $langs; - $ret=0; + $ret=0; - $sql = "SELECT"; + $sql = "SELECT"; $sql.= " t.rowid"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; - $sql.= " WHERE t.code = 'RECEP'"; - $sql.= " AND t.entity = " . getEntity('c_payment_term'); + $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; + $sql.= " WHERE t.code = 'RECEP'"; + $sql.= " AND t.entity IN (".getEntity('c_payment_term').")"; - dol_syslog(get_class($this)."::getDefaultId", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); - if ($obj) $ret=$obj->rowid; - } - $this->db->free($resql); - return $ret; - } - else - { - $this->error="Error ".$this->db->lasterror(); - return -1; - } - } + dol_syslog(get_class($this)."::getDefaultId", LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); + if ($obj) $ret=$obj->rowid; + } + $this->db->free($resql); + return $ret; + } + else + { + $this->error="Error ".$this->db->lasterror(); + return -1; + } + } /** @@ -293,7 +289,6 @@ class PaymentTerm // extends CommonObject $sql.= " nbjour=".(isset($this->nbjour)?$this->nbjour:"null").","; $sql.= " decalage=".(isset($this->decalage)?$this->decalage:"null").""; $sql.= " WHERE rowid = " . $this->id; - $sql.= " AND entity = " . getEntity('c_payment_term'); $this->db->begin(); @@ -336,11 +331,11 @@ class PaymentTerm // extends CommonObject } - /** + /** * Delete object in database * - * @param User $user User that delete - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param User $user User that delete + * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ function delete($user, $notrigger=0) @@ -350,7 +345,6 @@ class PaymentTerm // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."c_payment_term"; $sql.= " WHERE rowid = " . $this->id; - $sql.= " AND t.entity = " . getEntity('c_payment_term'); $this->db->begin(); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 2c95366f9a9..af872a174ca 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -35,8 +35,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies')); $id = (GETPOST('id')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref = GETPOST('ref','alpha'); @@ -155,7 +155,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 8b76f9b167f..828c77f1178 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -38,11 +38,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('propal'); -$langs->load('compta'); -$langs->load('other'); -$langs->load("bills"); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('propal', 'compta', 'other', 'bills', 'companies')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility @@ -125,7 +122,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { @@ -171,7 +168,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - print ''; + print ''; print "
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
\n"; print "
\n"; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 8d955f1141d..ec8f1f67bdf 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -43,10 +43,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -$langs->load('bills'); -$langs->load('compta'); -$langs->load('admin'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta', 'admin', 'other')); $action = GETPOST('action','alpha'); $massaction = GETPOST('massaction','alpha'); @@ -66,24 +64,10 @@ if ($action == "create" || $action == "add") $objecttype = ''; $result = restrictedArea($user, 'facture', $id, $objecttype); $projectid = GETPOST('projectid','int'); -$search_ref=GETPOST('search_ref'); -$search_societe=GETPOST('search_societe'); -$search_montant_ht=GETPOST('search_montant_ht'); -$search_montant_vat=GETPOST('search_montant_vat'); -$search_montant_ttc=GETPOST('search_montant_ttc'); -$search_payment_mode=GETPOST('search_payment_mode'); -$search_payment_term=GETPOST('search_payment_term'); -$day=GETPOST('day'); -$year=GETPOST('year'); -$month=GETPOST('month'); -$day_date_when=GETPOST('day_date_when'); $year_date_when=GETPOST('year_date_when'); $month_date_when=GETPOST('month_date_when'); -$search_recurring=GETPOST('search_recurring','int'); -$search_frequency=GETPOST('search_frequency','alpha'); -$search_unit_frequency=GETPOST('search_unit_frequency','alpha'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -144,28 +128,6 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once - // Do we click on purge search criteria ? - if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers - { - $search_ref=''; - $search_societe=''; - $search_montant_ht=''; - $search_montant_vat=''; - $search_montant_ttc=''; - $search_montant_mode=''; - $search_montant_term=''; - $day=''; - $year=''; - $month=''; - $day_date_when=''; - $year_date_when=''; - $month_date_when=''; - $search_recurring=''; - $search_frequency=''; - $search_unit_frequency=''; - $search_array_options=array(); - } - // Mass actions /*$objectclass='MyObject'; $objectlabel='MyObject'; @@ -453,7 +415,8 @@ if (empty($reshook)) $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute','none')); if ($ret < 0) $error++; - if (! $error) { + if (! $error) + { $result = $object->insertExtraFields('BILLREC_MODIFY'); if ($result < 0) { @@ -686,6 +649,9 @@ if (empty($reshook)) $fk_unit= GETPOST('units', 'alpha'); } + $date_start_fill = GETPOST('date_start_fill','int'); + $date_end_fill = GETPOST('date_end_fill','int'); + // Margin $fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value @@ -706,7 +672,7 @@ if (empty($reshook)) else { // Insert line - $result = $object->addline($desc, $pu_ht, $qty, $tva_tx,$localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit); + $result = $object->addline($desc, $pu_ht, $qty, $tva_tx,$localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill); if ($result > 0) { @@ -762,6 +728,9 @@ if (empty($reshook)) unset($_POST['date_endmonth']); unset($_POST['date_endyear']); + unset($_POST['date_start_fill']); + unset($_POST['date_end_fill']); + unset($_POST['situations']); unset($_POST['progress']); } @@ -883,6 +852,9 @@ if (empty($reshook)) $error ++; } + $date_start_fill = GETPOST('date_start_fill','int'); + $date_end_fill = GETPOST('date_end_fill','int'); + // Update line if (! $error) { @@ -905,7 +877,10 @@ if (empty($reshook)) $special_code, $label, GETPOST('units'), - $pu_ht_devise + $pu_ht_devise, + 0, + $date_start_fill, + $date_end_fill ); if ($result >= 0) @@ -1520,7 +1495,7 @@ else } print ''; - // Date when + // Date when (next invoice generation) print ''; if ($action == 'date_when' || $object->frequency > 0) { @@ -1536,7 +1511,14 @@ else print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached'); } //var_dump(dol_print_date($object->date_when+60, 'dayhour').' - '.dol_print_date($now, 'dayhour')); - if ($action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) print img_warning($langs->trans("Late")); + if (! $object->isMaxNbGenReached()) + { + if ($action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) print img_warning($langs->trans("Late")); + } + else + { + print img_info($langs->trans("MaxNumberOfGenerationReached")); + } print ''; print ''; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 00272fee9b3..8964b85203b 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -32,8 +32,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills')); $id = GETPOST("facid","int"); $ref=GETPOST("ref",'alpha'); @@ -69,7 +69,7 @@ $morehtmlref='
'; $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty -$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); +$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 0a2b9f72d60..87310d9b215 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -42,10 +42,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -$langs->load('bills'); -$langs->load('compta'); -$langs->load('admin'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta', 'admin', 'other')); $action = GETPOST('action','alpha'); $massaction = GETPOST('massaction','alpha'); @@ -83,7 +81,7 @@ $search_frequency=GETPOST('search_frequency','alpha'); $search_unit_frequency=GETPOST('search_unit_frequency','alpha'); $search_status=GETPOST('search_status','int'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -273,14 +271,20 @@ else if ($search_year_date_when > 0) $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,12,false))."'"; } +$sql.= $db->order($sortfield, $sortorder); + $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } -$sql.= $db->order($sortfield, $sortorder); $sql.= $db->plimit($limit+1,$offset); $resql = $db->query($sql); @@ -598,13 +602,20 @@ if ($resql) // Date next generation if (! empty($arrayfields['f.date_when']['checked'])) { - print ''; - print '
'; - print ($objp->frequency ? ($invoicerectmp->isMaxNbGenReached()?'':'').dol_print_date($db->jdate($objp->date_when),'day').($invoicerectmp->isMaxNbGenReached()?'':'') : ''.$langs->trans('NA').''); - if ($objp->frequency > 0 && $db->jdate($objp->date_when) && $db->jdate($objp->date_when) < $now) print img_warning($langs->trans("Late")); - print '
'; - print ''; - if (! $i) $totalarray['nbfield']++; + print ''; + print '
'; + print ($objp->frequency ? ($invoicerectmp->isMaxNbGenReached()?'':'').dol_print_date($db->jdate($objp->date_when),'day').($invoicerectmp->isMaxNbGenReached()?'':'') : ''.$langs->trans('NA').''); + if (! $invoicerectmp->isMaxNbGenReached()) + { + if ($objp->frequency > 0 && $db->jdate($objp->date_when) && $db->jdate($objp->date_when) < $now) print img_warning($langs->trans("Late")); + } + else + { + print img_info($langs->trans("MaxNumberOfGenerationReached")); + } + print '
'; + print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['f.datec']['checked'])) { @@ -631,7 +642,11 @@ if ($resql) print ''; if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) { - if (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) + if ($invoicerectmp->isMaxNbGenReached()) + { + print $langs->trans("MaxNumberOfGenerationReached"); + } + elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) { print ''; print $langs->trans("CreateBill").''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8319f42bd97..9d3e87f2d3c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -49,10 +49,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - -$langs->load('bills'); -$langs->load('companies'); -$langs->load('products'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies', 'products')); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0); @@ -66,6 +64,7 @@ $massaction=GETPOST('massaction','alpha'); $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'invoicelist'; $lineid=GETPOST('lineid','int'); $userid=GETPOST('userid','int'); @@ -89,20 +88,21 @@ $search_country=GETPOST("search_country",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_user = GETPOST('search_user','int'); $search_sale = GETPOST('search_sale','int'); -$day = GETPOST('day','int'); -$month = GETPOST('month','int'); -$year = GETPOST('year','int'); -$day_lim = GETPOST('day_lim','int'); -$month_lim = GETPOST('month_lim','int'); -$year_lim = GETPOST('year_lim','int'); +$search_day = GETPOST('search_day','int'); +$search_month = GETPOST('search_month','int'); +$search_year = GETPOST('search_year','int'); +$search_day_lim = GETPOST('search_day_lim','int'); +$search_month_lim = GETPOST('search_month_lim','int'); +$search_year_lim = GETPOST('search_year_lim','int'); +$search_categ_cus=trim(GETPOST("search_categ_cus",'int')); -$option = GETPOST('option'); +$option = GETPOST('search_option'); if ($option == 'late') { $search_status = '1'; } $filtre = GETPOST('filtre','alpha'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -114,9 +114,6 @@ if (! $sortfield) $sortfield='f.datef'; $pageprev = $page - 1; $pagenext = $page + 1; -// Initialize technical object to manage context to save list fields -$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'invoicelist'; - // Security check $fieldid = (! empty($ref)?'facnumber':'rowid'); if (! empty($user->societe_id)) $socid=$user->societe_id; @@ -129,6 +126,7 @@ $object=new Facture($db); $now=dol_now(); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new Facture($db); $hookmanager->initHooks(array('invoicelist')); $extrafields = new ExtraFields($db); @@ -219,16 +217,18 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','a $search_type=''; $search_country=''; $search_type_thirdparty=''; - $day=''; - $year=''; - $month=''; + $search_day=''; + $search_year=''; + $search_month=''; $option=''; $filter=''; - $day_lim=''; - $year_lim=''; - $month_lim=''; + $search_day_lim=''; + $search_year_lim=''; + $search_month_lim=''; $toselect=''; $search_array_options=array(); + $search_categ_cus=0; + } if (empty($reshook)) @@ -276,7 +276,7 @@ if ($massaction == 'withdrawrequest') $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); } - if(!($objecttmp->statut > Facture::STATUS_DRAFT)){ + if (!($objecttmp->statut > Facture::STATUS_DRAFT)){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("Draft"), $objecttmp->errors, 'errors'); } @@ -298,11 +298,11 @@ if ($massaction == 'withdrawrequest') $numprlv = $db->num_rows($result_sql); } - if($numprlv>0){ + if ($numprlv>0){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'errors'); } - if(!empty($objecttmp->mode_reglement_id ) && $objecttmp->mode_reglement_id != 3){ + if (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); } @@ -366,10 +366,12 @@ $sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.c $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= " country.code as country_code,"; -$sql.= " p.rowid as project_id, p.ref as project_ref"; +$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed'; +if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; + // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); // Add fields from hooks @@ -380,6 +382,8 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; +if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ + $sql.= ', '.MAIN_DB_PREFIX.'facture as f'; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_extrafields as ef on (f.rowid = ef.fk_object)"; if (! $sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid'; @@ -436,6 +440,8 @@ if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_va if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1); if ($search_montant_localtax2 != '') $sql.= natural_search('f.localtax2', $search_montant_localtax2, 1); if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1); +if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL"; if ($search_status != '' && $search_status >= 0) { if ($search_status == '0') $sql.=" AND f.fk_statut = 0"; // draft @@ -444,31 +450,31 @@ if ($search_status != '' && $search_status >= 0) if ($search_status == '3') $sql.=" AND f.fk_statut = 3"; // abandonned } if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode); -if ($month > 0) +if ($search_month > 0) { - if ($year > 0 && empty($day)) - $sql.= " AND f.datef 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 f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; + if ($search_year > 0 && empty($search_day)) + $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; + else if ($search_year > 0 && ! empty($search_day)) + $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $serch_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$month."'"; } -else if ($year > 0) +else if ($search_year > 0) { - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } -if ($month_lim > 0) +if ($search_month_lim > 0) { - if ($year_lim > 0 && empty($day_lim)) - $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_get_first_day($year_lim,$month_lim,false))."' AND '".$db->idate(dol_get_last_day($year_lim,$month_lim,false))."'"; - else if ($year_lim > 0 && ! empty($day_lim)) - $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_lim, $day_lim, $year_lim))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month_lim, $day_lim, $year_lim))."'"; + if ($search_year_lim > 0 && empty($search_day_lim)) + $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_get_first_day($search_year_lim,$search_month_lim,false))."' AND '".$db->idate(dol_get_last_day($search_year_lim,$search_month_lim,false))."'"; + else if ($search_year_lim > 0 && ! empty($search_day_lim)) + $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_lim, $search_day_lim, $search_year_lim))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_lim, $search_day_lim, $search_year_lim))."'"; else - $sql.= " AND date_format(f.date_lim_reglement, '%m') = '".$db->escape($month_lim)."'"; + $sql.= " AND date_format(f.date_lim_reglement, '%m') = '".$db->escape($search_month_lim)."'"; } -else if ($year_lim > 0) +else if ($search_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))."'"; + $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_get_first_day($search_year_lim,1,false))."' AND '".$db->idate(dol_get_last_day($search_year_lim,12,false))."'"; } if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'"; if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; @@ -508,7 +514,8 @@ else $sql.= ' ORDER BY '; $listfield=explode(',',$sortfield); -foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.$sortorder.','; +$listorder=explode(',',$sortorder); +foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.($listorder[$key]?$listorder[$key]:'DESC').','; $sql.= ' f.rowid DESC '; $nbtotalofrecords = ''; @@ -516,6 +523,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1,$offset); @@ -536,19 +548,21 @@ if ($resql) } $param='&socid='.$socid; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($sall) $param.='&sall='.urlencode($sall); - if ($day) $param.='&day='.urlencode($day); - if ($month) $param.='&month='.urlencode($month); - if ($year) $param.='&year=' .urlencode($year); - if ($day_lim) $param.='&day_lim='.urlencode($day_lim); - if ($month_lim) $param.='&month_lim='.urlencode($month_lim); - if ($year_lim) $param.='&year_lim=' .urlencode($year_lim); + if ($search_day) $param.='&search_day='.urlencode($search_day); + if ($search_month) $param.='&search_month='.urlencode($search_month); + if ($search_year) $param.='&search_year=' .urlencode($search_year); + if ($search_day_lim) $param.='&search_day_lim='.urlencode($search_day_lim); + if ($search_month_lim) $param.='&search_month_lim='.urlencode($search_month_lim); + if ($search_year_lim) $param.='&search_year_lim=' .urlencode($search_year_lim); if ($search_ref) $param.='&search_ref=' .urlencode($search_ref); if ($search_refcustomer) $param.='&search_refcustomer=' .urlencode($search_refcustomer); if ($search_type != '') $param.='&search_type='.urlencode($search_type); if ($search_societe) $param.='&search_societe=' .urlencode($search_societe); + if ($search_town) $param.='&search_town='.urlencode($search_town); + if ($search_zip) $param.='&search_zip='.urlencode($search_zip); if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale); if ($search_user > 0) $param.='&search_user=' .urlencode($search_user); if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category); @@ -559,9 +573,11 @@ if ($resql) if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc); if ($search_status != '') $param.='&search_status='.urlencode($search_status); if ($search_paymentmode > 0) $param.='search_paymentmode='.urlencode($search_paymentmode); - if ($show_files) $param.='&show_files=' .$show_files; - if ($option) $param.="&option=".$option; - if ($optioncss != '') $param.='&optioncss='.$optioncss; + if ($show_files) $param.='&show_files='.urlencode($show_files); + if ($option) $param.="&search_option=".urlencode($option); + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus); + // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -570,26 +586,29 @@ if ($resql) 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); - if ($conf->prelevement->enabled) - { - $langs->load("withdrawals"); - $arrayofmassactions['withdrawrequest']=$langs->trans("MakeWithdrawRequest"); + if ($conf->prelevement->enabled) { + $langs->load("withdrawals"); + $arrayofmassactions['withdrawrequest'] = $langs->trans("MakeWithdrawRequest"); } - if ($user->rights->facture->supprimer) - { - //if (! empty($conf->global->STOCK_CALCULATE_ON_BILL) || empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) - if (empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) - { - // mass deletion never possible on invoices on such situation + if ($user->rights->facture->supprimer) { + if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) { + $arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft"); } - else - { - $arrayofmassactions['predelete']=$langs->trans("Delete"); - } - } - if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); + elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation + $arrayofmassactions['predelete'] = $langs->trans("Delete"); + } + } + if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); + $newcardbutton=''; + if($user->rights->facture->creer) + { + $newcardbutton=''.$langs->trans('NewBill').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + $i = 0; print ''."\n"; @@ -603,7 +622,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit); $topicmail="SendBillRef"; $modelmail="facture_send"; @@ -645,6 +664,14 @@ if ($resql) $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter.='
'; } + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': '; + $moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',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; @@ -702,19 +729,19 @@ if ($resql) if (! empty($arrayfields['f.date']['checked'])) { print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($year?$year:-1,'year',1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($search_year?$search_year:-1,'search_year',1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); print ''; } // Date due if (! empty($arrayfields['f.date_lim_reglement']['checked'])) { print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($year_lim?$year_lim:-1,'year_lim',1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); - print '
'.$langs->trans("Late"); + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($search_year_lim?$search_year_lim:-1,'search_year_lim',1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); + print '
'.$langs->trans("Late"); print ''; } // Project @@ -867,7 +894,7 @@ if ($resql) print $hookmanager->resPrint; if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"f.fk_statut,f.paye,f.type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; @@ -979,6 +1006,7 @@ if ($resql) { $projectstatic->id=$obj->project_id; $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; print $projectstatic->getNomUrl(1); } print ''; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 755ac413743..58fc26030b7 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -33,8 +33,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref=GETPOST('ref','alpha'); @@ -92,7 +92,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 989e742afee..ecde973bd3b 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -37,10 +37,8 @@ if (! empty($conf->projet->enabled)) { if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("bills"); -$langs->load("banks"); -$langs->load("withdrawals"); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'withdrawals', 'companies')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref=GETPOST('ref','alpha'); @@ -140,8 +138,16 @@ if ($object->id > 0) if ($object->paye) $resteapayer=0; $resteapayeraffiche=$resteapayer; - $absolute_discount=$object->thirdparty->getAvailableDiscounts('','fk_facture_source IS NULL'); - $absolute_creditnote=$object->thirdparty->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } else { + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; + } + + $absolute_discount=$object->thirdparty->getAvailableDiscounts('',$filterabsolutediscount); + $absolute_creditnote=$object->thirdparty->getAvailableDiscounts('',$filtercreditnote); $absolute_discount=price2num($absolute_discount,'MT'); $absolute_creditnote=price2num($absolute_creditnote,'MT'); @@ -253,61 +259,13 @@ if ($object->id > 0) // Discounts print ''.$langs->trans('Discounts').''; - if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); - print '. '; - if ($absolute_discount > 0) - { - if ($object->statut > Facture::STATUS_DRAFT || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) - { - if ($object->statut == Facture::STATUS_DRAFT) - { - print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)).'. '; - } - else - { - if ($object->statut < Facture::STATUS_VALIDATED || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - print '
'.$text.'.
'; - } - else - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); - } - } - } - else - { - // Remise dispo de type non avoir - $filter='fk_facture_source IS NULL'; - print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$object->thirdparty->id,$absolute_discount,$filter,$resteapayer,'',1); - } - } - if ($absolute_creditnote > 0) - { - // If validated, we show link "add credit note to payment" - if ($object->statut != Facture::STATUS_VALIDATED || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_CREDIT_NOTE) - { - if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_DEPOSIT) - { - $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); - } - else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; - } - else - { - // Remise dispo de type avoir - $filter='fk_facture_source IS NOT NULL'; - if (! $absolute_discount) print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id_for_payment',$object->thirdparty->id,$absolute_creditnote,$filter,$resteapayer,'',1); - } - } - if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.'; + + $thirdparty = $object->thirdparty; + $discount_type = 0; + $backtopage = urlencode($_SERVER["PHP_SELF"] . '?facid=' . $object->id); + $cannotApplyDiscount = 1; + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; + print ''; // Date invoice diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index d85255fbf4e..0416e04f7b0 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -3,7 +3,7 @@ * Copyright (c) 2004-2012 Laurent Destailleur * Copyright (C) 2012 Marcos García * Copyright (C) 2013 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 @@ -57,10 +57,8 @@ $endyear=$year; /* * View */ - -$langs->load('bills'); -$langs->load('companies'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies', 'other')); $form=new Form($db); @@ -331,7 +329,7 @@ print '
'; // Show graphs -print '"; print "\n"; - $coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell'); + $coll_list = tax_by_thirdparty('localtax'.$local, $db, 0, $date_start, $date_end, $modetax, 'sell'); $action = "tvaclient"; $object = &$coll_list; @@ -176,12 +181,11 @@ if($calc ==0 || $calc == 2) if (is_array($coll_list)) { - $var=true; $total = 0; $totalamount = 0; $i = 1; foreach($coll_list as $coll) { - if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) !=0) + if(($min == 0 || ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) !=0) { $intra = str_replace($find,$replace,$coll->tva_intra); @@ -244,19 +248,18 @@ if($calc ==0 || $calc == 1){ $company_static=new Societe($db); - $coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy'); + $coll_list = tax_by_thirdparty('localtax'.$local, $db, 0, $date_start, $date_end,$modetax, 'buy'); $parameters["direction"] = 'buy'; $parameters["type"] = 'localtax'.$local; $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (is_array($coll_list)) { - $var=true; $total = 0; $totalamount = 0; $i = 1; foreach($coll_list as $coll) { - if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) != 0) + if(($min == 0 || ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) != 0) { $intra = str_replace($find,$replace,$coll->tva_intra); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 5d17688fc68..c62034ee65c 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2018 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 @@ -22,48 +23,71 @@ * \brief Index page of IRPF reports */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; -$langs->load("other"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $localTaxType=GETPOST('localTaxType', 'int'); +// Date range $year=GETPOST("year","int"); -if ($year == 0) +if (empty($year)) { - $year_current = strftime("%Y",time()); - $year_start = $year_current; + $year_current = strftime("%Y",dol_now()); + $year_start = $year_current; } else { - $year_current = $year; - $year_start = $year; + $year_current = $year; + $year_start = $year; +} +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); +if (empty($date_start) || empty($date_end)) // We define date_start and date_end +{ + $q=GETPOST("q","int"); + if (empty($q)) + { + if (GETPOST("month","int")) { $date_start=dol_get_first_day($year_start,GETPOST("month","int"),false); $date_end=dol_get_last_day($year_start,GETPOST("month","int"),false); } + else + { + $date_start=dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START,false); + $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + } + } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } +// Define modetax (0 or 1) +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products +$modetax = $conf->global->TAX_MODE; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); +if (empty($modetax)) $modetax=0; + // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) - $socid=$user->societe_id; +$socid = GETPOST('socid','int'); +if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -// Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit -$modetax = $conf->global->TAX_MODE; -if (isset($_GET["modetax"])) - $modetax=$_GET["modetax"]; /** * print function * - * @param DoliDB $db Database - * @param string $sql sql - * @param string $date date - * @return void + * @param DoliDB $db Database handler + * @param string $sql SQL Request + * @param string $date Date + * @return void */ -function pt ($db, $sql, $date) +function pt($db, $sql, $date) { global $conf, $bc,$langs; @@ -73,29 +97,92 @@ function pt ($db, $sql, $date) $i = 0; $total = 0; print '
'; +print ' - - - - - + + + + - - + + 1) } ?> - \ No newline at end of file + diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php index e0f132e2ad5..91056746565 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php @@ -62,7 +62,7 @@ foreach($linkedObjectBlock as $key => $objectlink) print $objectlink->getLibStatut(3); ?> - + tax->enabled)) //if (!$user->rights->compta->general->lire) // accessforbidden(); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); if (! empty($conf->commande->enabled)) $langs->load("orders"); @@ -199,7 +199,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print $facturestatic->getNomUrl(1,''); print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 5934ca71afb..2bc754ccf11 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -33,9 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -$langs->load("companies"); -$langs->load("other"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadlangs(array('companies', 'other', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index f4b027b5016..24b36cf76c0 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; - -$langs->load("companies"); -$langs->load("other"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'other', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 317d3ae813d..e8a84fcc9e1 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -25,10 +25,10 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); $id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); @@ -38,11 +38,11 @@ if (empty($refund)) $refund=0; $lttype=GETPOST('localTaxType', 'int'); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -$localtax = new Localtax($db); +$object = new Localtax($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('localtaxvatcard','globalcard')); @@ -52,9 +52,9 @@ $hookmanager->initHooks(array('localtaxvatcard','globalcard')); * Actions */ -//add payment of localtax -if($_POST["cancel"] == $langs->trans("Cancel")){ - header("Location: reglement.php?localTaxType=".$lttype); +if ($_POST["cancel"] == $langs->trans("Cancel") && ! $id) +{ + header("Location: list.php?localTaxType=".$lttype); exit; } @@ -66,25 +66,25 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); $datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); - $localtax->accountid=GETPOST("accountid"); - $localtax->paymenttype=GETPOST("paiementtype"); - $localtax->datev=$datev; - $localtax->datep=$datep; - $localtax->amount=price2num(GETPOST("amount")); - $localtax->label=GETPOST("label"); - $localtax->ltt=$lttype; + $object->accountid=GETPOST("accountid"); + $object->paymenttype=GETPOST("paiementtype"); + $object->datev=$datev; + $object->datep=$datep; + $object->amount=price2num(GETPOST("amount")); + $object->label=GETPOST("label"); + $object->ltt=$lttype; - $ret=$localtax->addPayment($user); + $ret=$object->addPayment($user); if ($ret > 0) { $db->commit(); - header("Location: reglement.php?localTaxType=".$lttype); + header("Location: list.php?localTaxType=".$lttype); exit; } else { $db->rollback(); - setEventMessages($localtax->error, $localtax->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $_GET["action"]="create"; } } @@ -92,39 +92,39 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) //delete payment of localtax if ($action == 'delete') { - $result=$localtax->fetch($id); + $result=$object->fetch($id); - if ($localtax->rappro == 0) + if ($object->rappro == 0) { $db->begin(); - $ret=$localtax->delete($user); + $ret=$object->delete($user); if ($ret > 0) { - if ($localtax->fk_bank) + if ($object->fk_bank) { $accountline=new AccountLine($db); - $result=$accountline->fetch($localtax->fk_bank); + $result=$accountline->fetch($object->fk_bank); if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) } if ($result >= 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt); + header("Location: ".DOL_URL_ROOT.'/compta/localtax/list.php?localTaxType='.$object->ltt); exit; } else { - $localtax->error=$accountline->error; + $object->error=$accountline->error; $db->rollback(); - setEventMessages($localtax->error, $localtax->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { $db->rollback(); - setEventMessages($localtax->error, $localtax->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else @@ -136,17 +136,12 @@ if ($action == 'delete') /* -* View -*/ - -llxHeader(); - -$form = new Form($db); + * View + */ if ($id) { - $vatpayment = new Localtax($db); - $result = $vatpayment->fetch($id); + $result = $object->fetch($id); if ($result <= 0) { dol_print_error($db); @@ -154,6 +149,13 @@ if ($id) } } +$form = new Form($db); + +$title=$langs->trans("LT".$object->ltt) . " - " . $langs->trans("Card"); +$help_url=''; +llxHeader("",$title,$helpurl); + + if ($action == 'create') { @@ -169,11 +171,11 @@ if ($action == 'create') print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index ca3ec7c89c0..3964800fd2b 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -47,12 +47,12 @@ foreach($linkedObjectBlock as $key => $objectlink) $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> -
trans("CustomerInvoice"); ?>getNomUrl(1); ?>ref_client; ?>date,'day'); ?>" data-element="element; ?>" data-id="id; ?>" > + trans("CustomerInvoice"); ?>getNomUrl(1); ?>ref_client; ?>date,'day'); ?>rights->facture->lire) { $sign = 1; if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1; @@ -66,8 +66,8 @@ foreach($linkedObjectBlock as $key => $objectlink) echo ''.price($objectlink->total_ht).''; } } ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink")); ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
">transnoentitiesnoconv("RemoveLink")); ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; - print $companystatic->getNomUrl(1,'',16); + print $companystatic->getNomUrl(1,'customer',16); print ''.price($obj->total_ttc).'
'; print ""; - print ''; - print ''; @@ -218,47 +220,48 @@ if ($action == 'create') } -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - +// View mode if ($id) { $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$vatpayment->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$object->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; - dol_fiche_head($head, 'card', $langs->trans("VATPayment"), 0, 'payment'); + dol_fiche_head($head, 'card', $langs->transcountry("LT".$object->ltt, $mysoc->country_code), -1, 'payment'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); + + print '
'; + print '
'; print '
'.$langs->trans("DatePayment").''; + print ''.$langs->trans("DatePayment").''; print $form->select_date($datep,"datep",'','','','add',1,1); print '
'.$langs->trans("DateValue").''; + print '
'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; print $form->select_date($datev,"datev",'','','','add',1,1); print '
'; print ""; - print ''; print ""; print ''; - print ''; - print ''; + print ''; if (! empty($conf->banque->enabled)) { - if ($vatpayment->fk_account > 0) + if ($object->fk_account > 0) { $bankline=new AccountLine($db); - $bankline->fetch($vatpayment->fk_bank); + $bankline->fetch($object->fk_bank); print ''; print ''; @@ -271,22 +274,28 @@ if ($id) // Other attributes $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'.$langs->trans("Ref").''; - print $vatpayment->ref; + print ''.$langs->trans("Ref").''; + print $object->ref; print '
'.$langs->trans("DatePayment").''; - print dol_print_date($vatpayment->datep,'day'); + print dol_print_date($object->datep,'day'); print '
'.$langs->trans("DateValue").''; - print dol_print_date($vatpayment->datev,'day'); + print '
'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; + print dol_print_date($object->datev,'day'); print '
'.$langs->trans("Amount").''.price($vatpayment->amount).'
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans('BankTransactionLine').'
'; - dol_fiche_end(); + print ''; + + dol_fiche_end(); /* - * Boutons d'actions - */ + * Action buttons + */ print "
\n"; - if ($vatpayment->rappro == 0) - print ''.$langs->trans("Delete").''; + if ($object->rappro == 0) + { + print ''.$langs->trans("Delete").''; + } else + { print ''.$langs->trans("Delete").''; + } print "
"; } diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 79a88d11c4d..a75de537724 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Localtax extends CommonObject { - var $ltt; + public $element='localtax'; //!< Id that identify managed objects + public $table_element='localtax'; //!< Name of table without prefix where object is stored + public $picto='payment'; + + var $ltt; var $tms; var $datep; var $datev; @@ -607,4 +611,29 @@ class Localtax extends CommonObject return $result; } + /** + * Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) + * + * @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 Libelle + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->statut,$mode); + } + + /** + * Renvoi le libelle d'un statut donne + * + * @param int $status Statut + * @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 Libelle du statut + */ + function LibStatut($status,$mode=0) + { + global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + + return ''; + } + } diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 70d52c3d9d3..9502ff46d2d 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -26,17 +26,16 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; -$langs->load("bills"); -$langs->load("compta"); -$langs->load("companies"); -$langs->load("products"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $local=GETPOST('localTaxType', 'int'); // Date range -$year=GETPOST("year"); +$year=GETPOST("year","int"); if (empty($year)) { $year_current = strftime("%Y",dol_now()); @@ -45,43 +44,48 @@ if (empty($year)) $year_current = $year; $year_start = $year; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); // Quarter if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $q=GETPOST("q"); if (empty($q)) { - if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); } + if (GETPOST("month")) { $date_start=dol_get_first_day($year_start,GETPOST("month"),false); $date_end=dol_get_last_day($year_start,GETPOST("month"),false); } else { - $month_current = strftime("%m",dol_now()); - if ($month_current >= 10) $q=4; - elseif ($month_current >= 7) $q=3; - elseif ($month_current >= 4) $q=2; - else $q=1; + $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); + if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } - if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } - if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } - if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } - if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } -$min = GETPOST("min"); +$min = price2num(GETPOST("min","alpha")); if (empty($min)) $min = 0; // Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = $conf->global->TAX_MODE; -if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"]; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); +if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); + + /* * View */ @@ -98,6 +102,9 @@ foreach($listofparams as $param) llxHeader('','','','',0,0,'','',$morequerystring); + +$name=$langs->transcountry($local==1?"LT1ReportByCustomers":"LT2ReportByCustomers", $mysoc->country_code); + $fsearch.='
'; $fsearch.=' '; $fsearch.=' '; @@ -108,7 +115,6 @@ $calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local; // Affiche en-tete du rapport if ($calc==0 || $calc==1) // Calculate on invoice for goods and services { - $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $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); @@ -126,7 +132,6 @@ if ($calc==0 || $calc==1) // Calculate on invoice for goods and services } if ($calc==2) // Invoice for goods, payment for services { - $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$langs->trans("CalcModeLT2Debt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $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); @@ -160,7 +165,7 @@ if($calc ==0 || $calc == 2) print "
".$vatcust."
'; + print ''; - print ''; - print ''; - print ''."\n"; + print ''; + print ''; + print ''; print "\n"; - $var=True; + + $totalclaimed = 0; + $totalpaid = 0; + $amountclaimed = 0; + $amountpaid = 0; + $previousmonth = ''; + $previousmode = ''; + $mode = ''; + while ($i < $num) { $obj = $db->fetch_object($result); - - print ''; - print '\n"; - $total = $total + $obj->mm; + $mode = $obj->mode; - print '\n"; - print "\n"; + //print $obj->dm.' '.$obj->mode.' '.$previousmonth.' '.$previousmode; + if ($obj->mode == 'claimed' && ! empty($previousmode)) + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; + + $amountclaimed = 0; + $amountpaid = 0; + } + + if ($obj->mode == 'claimed') + { + $amountclaimed = $obj->mm; + $totalclaimed = $totalclaimed + $amountclaimed; + } + if ($obj->mode == 'paid') + { + $amountpaid = $obj->mm; + $totalpaid = $totalpaid + $amountpaid; + } + + if ($obj->mode == 'paid') + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; + $amountclaimed = 0; + $amountpaid = 0; + $previousmode = ''; + $previousmonth = ''; + } + else + { + $previousmode = $obj->mode; + $previousmonth = $obj->dm; + } $i++; } - print '"; + + if ($mode == 'claimed' && ! empty($previousmode)) + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; + + $amountclaimed = 0; + $amountpaid = 0; + } + + print ''; + print ''; + print ''; + print ''; + print ""; print "
'.$date.''.$langs->trans("Amount").' '.$date.''.$langs->trans("ClaimedForThisPeriod").''.$langs->trans("PaidDuringThisPeriod").'
'.$obj->dm."'.price($obj->mm)." 
'.$obj->dm."'.price($amountclaimed)."'.price($amountpaid)."
'.$obj->dm."'.price($amountclaimed)."'.price($amountpaid)."
'.$langs->trans("Total")." :".price($total)." 
'.$previousmonth."'.price($amountclaimed)."'.price($amountpaid)."
'.$langs->trans("Total").''.price($totalclaimed).''.price($totalpaid).'
"; $db->free($result); - } else { + } + else { dol_print_error($db); } } @@ -105,7 +192,9 @@ function pt ($db, $sql, $date) * View */ -llxHeader(); +$form=new Form($db); +$company_static=new Societe($db); +$tva = new Tva($db); if($localTaxType==1) { $LT='LT1'; @@ -123,24 +212,37 @@ if($localTaxType==1) { $CalcLT= $conf->global->MAIN_INFO_LOCALTAX_CALC2; } +$fsearch.=' '; +$description = $fsearch; -$textprevyear="".img_previous().""; -$textnextyear=" ".img_next().""; +// Show report header +$name = $langs->trans("ReportByMonth"); +$description .= $langs->trans($LT); +$calcmode = $langs->trans("LTReportBuildWithOptionDefinedInModule").' '; +$calcmode.= '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; + +//if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +$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); + +$builddate=dol_now(); + + +llxHeader('', $name); + +//$textprevyear="".img_previous().""; +//$textnextyear=" ".img_next().""; +//print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png'); + +report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); +//report_header($name,'',$textprevyear.$langs->trans("Year")." ".$year_start.$textnextyear,'',$description,$builddate,$exportlink,array(),$calcmode); -print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png'); -print $langs->trans("LTReportBuildWithOptionDefinedInModule").'
'; -print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; print '
'; -print ''; -print ''; +print '
'; -print '
'; -print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code), '', ''); -print ' '; -print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code), '', ''); -print '
'; +print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code), '', ''); print ''; print ''; @@ -155,137 +257,335 @@ if($CalcLT==1) { if($CalcLT==2) { print ""; } - print ""; print "\n"; print "\n"; -$y = $year_current ; +$tmp=dol_getdate($date_start); +$y = $tmp['year']; +$m = $tmp['mon']; +$tmp=dol_getdate($date_end); +$yend = $tmp['year']; +$mend = $tmp['mon']; -$var=True; $total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; -$i=0; -for ($m = 1 ; $m < 13 ; $m++ ) { - $coll_listsell = vat_by_date($db, $y, 0, 0, 0, $modetax, 'sell', $m); - $coll_listbuy = vat_by_date($db, $y, 0, 0, 0, $modetax, 'buy', $m); - +$i=0; $mcursor=0; +while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop +{ + //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); + if ($m == 13) $y++; + if ($m > 12) $m -= 12; + $mcursor++; + + // Get array with details of each line + $x_coll = tax_by_rate(($localTaxType==1?'localtax1':'localtax2'), $db, $y, 0, 0, 0, $modetax, 'sell', $m); + $x_paye = tax_by_rate(($localTaxType==1?'localtax1':'localtax2'), $db, $y, 0, 0, 0, $modetax, 'buy', $m); + + $x_both = array(); + //now, from these two arrays, get another array with one rate per line + foreach(array_keys($x_coll) as $my_coll_rate) + { + $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; + $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['coll']['localtax1'] = $x_coll[$my_coll_rate]['localtax1']; + $x_both[$my_coll_rate]['coll']['localtax2'] = $x_coll[$my_coll_rate]['localtax2']; + $x_both[$my_coll_rate]['paye']['totalht'] = 0; + $x_both[$my_coll_rate]['paye']['vat'] = 0; + $x_both[$my_coll_rate]['paye']['localtax1'] = 0; + $x_both[$my_coll_rate]['paye']['localtax2'] = 0; + $x_both[$my_coll_rate]['coll']['links'] = ''; + $x_both[$my_coll_rate]['coll']['detail'] = array(); + foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { + //$invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; + //$invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; + //$invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; + //$company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); + $x_both[$my_coll_rate]['coll']['detail'][] = array( + 'id' =>$x_coll[$my_coll_rate]['facid'][$id], + 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], + 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], + 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], + 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], + 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], + 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], + 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], + 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], + 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], + 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], + 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], + 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], + + 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], + 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], + 'localtax1' =>$x_coll[$my_coll_rate]['localtax1_list'][$id], + 'localtax2' =>$x_coll[$my_coll_rate]['localtax2_list'][$id], + //'link' =>$invoice_customer->getNomUrl(1,'',12) + ); + } + } + + // tva paid + foreach (array_keys($x_paye) as $my_paye_rate) { + $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; + $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; + $x_both[$my_paye_rate]['paye']['localtax1'] = $x_paye[$my_paye_rate]['localtax1']; + $x_both[$my_paye_rate]['paye']['localtax2'] = $x_paye[$my_paye_rate]['localtax2']; + if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { + $x_both[$my_paye_rate]['coll']['totalht'] = 0; + $x_both[$my_paye_rate]['coll']['vat'] = 0; + $x_both[$my_paye_rate]['coll']['localtax1'] = 0; + $x_both[$my_paye_rate]['coll']['localtax2'] = 0; + } + $x_both[$my_paye_rate]['paye']['links'] = ''; + $x_both[$my_paye_rate]['paye']['detail'] = array(); + + foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) + { + // ExpenseReport + if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') + { + //$expensereport->id=$x_paye[$my_paye_rate]['facid'][$id]; + //$expensereport->ref=$x_paye[$my_paye_rate]['facnum'][$id]; + //$expensereport->type=$x_paye[$my_paye_rate]['type'][$id]; + + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + 'localtax1' =>$x_paye[$my_paye_rate]['localtax1_list'][$id], + 'localtax2' =>$x_paye[$my_paye_rate]['localtax2_list'][$id], + //'link' =>$expensereport->getNomUrl(1) + ); + } + else + { + //$invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; + //$invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; + //$invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; + //$company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], + 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + 'localtax1' =>$x_paye[$my_paye_rate]['localtax1_list'][$id], + 'localtax2' =>$x_paye[$my_paye_rate]['localtax2_list'][$id], + //'link' =>$invoice_supplier->getNomUrl(1,'',12) + ); + } + } + } + //now we have an array (x_both) indexed by rates for coll and paye + $action = "tva"; - $object = array(&$coll_listsell, &$coll_listbuy); + $object = array(&$x_coll, &$x_paye, &$x_both); $parameters["mode"] = $modetax; $parameters["year"] = $y; $parameters["month"] = $m; $parameters["type"] = 'localtax'.$localTaxType; - + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks - if (! is_array($coll_listbuy) && $coll_listbuy == -1) { + if (! is_array($x_coll) && $coll_listbuy == -1) + { $langs->load("errors"); print ''; break; } - if (! is_array($coll_listbuy) && $coll_listbuy == -2) { + if (! is_array($x_paye) && $coll_listbuy == -2) + { print ''; break; } - + print ''; - print ''; - if($CalcLT==0) { - $x_coll = 0; - foreach($coll_listsell as $vatrate=>$val) { - $x_coll+=$val[$localTaxType==1?'localtax1':'localtax2']; - } - $subtotalcoll = $subtotalcoll + $x_coll; - print ""; + print ''; - $x_paye = 0; - foreach($coll_listbuy as $vatrate=>$val) { - $x_paye+=$val[$localTaxType==1?'localtax1':'localtax2']; - } - $subtotalpaye = $subtotalpaye + $x_paye; - print ""; - } elseif($CalcLT==1) { - $x_paye = 0; - foreach($coll_listbuy as $vatrate=>$val) { - $x_paye+=$val[$localTaxType==1?'localtax1':'localtax2']; - } - $subtotalpaye = $subtotalpaye + $x_paye; - print ""; - } elseif($CalcLT==2) { - $x_coll = 0; - foreach($coll_listsell as $vatrate=>$val) { - $x_coll+=$val[$localTaxType==1?'localtax1':'localtax2']; - } - $subtotalcoll = $subtotalcoll + $x_coll; - print ""; - - } + $x_coll_sum = 0; + foreach (array_keys($x_coll) as $rate) + { + $subtot_coll_total_ht = 0; + $subtot_coll_vat = 0; - if($CalcLT==0) { - $diff= $x_coll - $x_paye; - } elseif($CalcLT==1) { - $diff= $x_paye; - } elseif($CalcLT==2) { - $diff= $x_coll; + foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) + { + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) + { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + } + } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_vat=$fields['localtax'.$localTaxType]*$ratiopaymentinvoice; + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; + } } - + print ""; + + $x_paye_sum = 0; + foreach (array_keys($x_paye) as $rate) + { + $subtot_paye_total_ht = 0; + $subtot_paye_vat = 0; + + foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) + { + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) + { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + } + } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_vat=$fields['localtax'.$localTaxType]*$ratiopaymentinvoice; + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; + } + } + print ""; + + $subtotalcoll = $subtotalcoll + $x_coll_sum; + $subtotalpaye = $subtotalpaye + $x_paye_sum; + + $diff = $x_coll_sum - $x_paye_sum; $total = $total + $diff; - $subtotal = $subtotal + $diff; + $subtotal = price2num($subtotal + $diff, 'MT'); - print "\n"; + print "\n"; print "\n"; print "\n"; - $i++; - if ($i > 2) { - print ''; - print ''; - if($CalcLT==0) { - print ''; - print ''; - print ''; - } elseif($CalcLT==1) { - print ''; - print ''; - } elseif($CalcLT==2) { - print ''; - print ''; - } - print ''; - $i = 0; - $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; + $i++; $m++; + if ($i > 2) + { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i = 0; + $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; } } -print ''; +print ''; print "\n"; print ''; print '
".$langs->transcountry($LTCustomer,$mysoc->country_code)."".$langs->trans("TotalToPay")." 
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'".price($x_coll)."'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'".price($x_paye)."".price($x_paye)."".price($x_coll)."".price(price2num($x_coll_sum,'MT'))."".price(price2num($x_paye_sum,'MT'))."".price($diff)."".price(price2num($diff,'MT'))." 
'.$langs->trans("SubTotal").':'.price($subtotalcoll).''.price($subtotalpaye).''.price($subtotal).''.price($subtotalpaye).''.price($subtotal).''.price($subtotalcoll).''.price($subtotal).' 
'.$langs->trans("SubTotal").':'.price(price2num($subtotalcoll,'MT')).''.price(price2num($subtotalpaye,'MT')).''.price(price2num($subtotal,'MT')).' 
'.$langs->trans("TotalToPay").':'.price($total).'
'.$langs->trans("TotalToPay").':'.price(price2num($total, 'MT')).' 
'; -print '
 '; + +print '
'; + + /* * Payed */ -$sql = "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm"; +print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code), '', ''); + +$sql=''; + +$sql.= "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm, 'claimed' as mode"; $sql.= " FROM ".MAIN_DB_PREFIX."localtax as f"; $sql.= " WHERE f.entity = ".$conf->entity; -$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'"; -$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'"; +$sql.= " AND (f.datev >= '".$db->idate($date_start)."' AND f.datev <= '".$db->idate($date_end)."')"; $sql.= " AND localtaxtype=".$localTaxType; $sql.= " GROUP BY dm"; -$sql.= " ORDER BY dm ASC"; -pt($db, $sql,$langs->trans("Year")." $y"); +$sql.= " UNION "; -print '
'; +$sql.= "SELECT SUM(amount) as mm, date_format(f.datep,'%Y-%m') as dm, 'paid' as mode"; +$sql.= " FROM ".MAIN_DB_PREFIX."localtax as f"; +$sql.= " WHERE f.entity = ".$conf->entity; +$sql.= " AND (f.datep >= '".$db->idate($date_start)."' AND f.datep <= '".$db->idate($date_end)."')"; +$sql.= " AND localtaxtype=".$localTaxType; +$sql.= " GROUP BY dm"; -print ''; -print ''; +$sql.= " ORDER BY dm ASC, mode ASC"; +//print $sql; + +pt($db, $sql, $langs->trans("Month")); + + +print '
'; llxFooter(); $db->close(); diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/list.php similarity index 72% rename from htdocs/compta/localtax/reglement.php rename to htdocs/compta/localtax/list.php index 54183ef72b9..0e32a249f17 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/list.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/compta/localtax/reglement.php + * \file htdocs/compta/localtax/list.php * \ingroup tax * \brief List of IRPF payments */ @@ -24,15 +24,16 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; -$langs->load("compta"); +// Load translation files required by the page $langs->load("compta"); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); $ltt=GETPOST("localTaxType"); + /* * View */ @@ -41,12 +42,20 @@ llxHeader(); $localtax_static = new Localtax($db); -print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments",$mysoc->country_code)); +$newcardbutton=''; +if ($user->rights->tax->charges->creer) +{ + $newcardbutton=''.$langs->trans('NewLocalTaxPayment', ($ltt+1)).''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} -$sql = "SELECT rowid, amount, label, f.datev as dm"; +print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments",$mysoc->country_code), $newcardbutton); + +$sql = "SELECT rowid, amount, label, f.datev, f.datep"; $sql.= " FROM ".MAIN_DB_PREFIX."localtax as f "; $sql.= " WHERE f.entity = ".$conf->entity." AND localtaxtype=".$db->escape($ltt); -$sql.= " ORDER BY dm DESC"; +$sql.= " ORDER BY datev DESC"; $result = $db->query($sql); if ($result) @@ -59,6 +68,7 @@ if ($result) print ''; print ''.$langs->trans("Ref").''; print "".$langs->trans("Label").""; + print "".$langs->trans("PeriodEndDate").""; print ''.$langs->trans("DatePayment").''; print "".$langs->trans("PayedByThisPayment").""; print "\n"; @@ -66,14 +76,15 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - + print ''; $localtax_static->id=$obj->rowid; $localtax_static->ref=$obj->rowid; print "".$localtax_static->getNomUrl(1)."\n"; print "".dol_trunc($obj->label,40)."\n"; - print ''.dol_print_date($db->jdate($obj->dm),'day')."\n"; + print ''.dol_print_date($db->jdate($obj->datev),'day')."\n"; + print ''.dol_print_date($db->jdate($obj->datep),'day')."\n"; $total = $total + $obj->amount; print "".price($obj->amount).""; @@ -81,8 +92,8 @@ if ($result) $i++; } - print ''.$langs->trans("Total").''; - print "".price($total).""; + print ''.$langs->trans("Total").''; + print ''.price($total).''; print ""; $db->free($result); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 5e18c786c18..31729693f37 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -22,8 +22,7 @@ /** * \file htdocs/compta/tva/quadri_detail.php * \ingroup tax - * \brief Trimestrial page - detailed version - * TODO Deal with recurrent invoices as well + * \brief Local tax by rate */ global $mysoc; @@ -31,21 +30,22 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; -$langs->load("bills"); -$langs->load("compta"); -$langs->load("companies"); -$langs->load("products"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $local=GETPOST('localTaxType', 'int'); // Date range -$year=GETPOST("year"); +$year=GETPOST("year","int"); if (empty($year)) { $year_current = strftime("%Y",dol_now()); @@ -54,38 +54,41 @@ if (empty($year)) $year_current = $year; $year_start = $year; } - -$date_start = dol_mktime( 0, 0, 0, GETPOST( "date_startmonth" ), GETPOST( "date_startday" ), GETPOST( "date_startyear" ) ); -$date_end = dol_mktime( 23, 59, 59, GETPOST( "date_endmonth" ), GETPOST( "date_endday" ), GETPOST( "date_endyear" ) ); +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); // Quarter if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $q=GETPOST("q"); + $q=GETPOST("q","int"); if (empty($q)) { - if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); } + if (GETPOST("month","int")) { $date_start=dol_get_first_day($year_start,GETPOST("month","int"),false); $date_end=dol_get_last_day($year_start,GETPOST("month","int"),false); } else { - $month_current = strftime("%m",dol_now()); - if ($month_current >= 10) $q=4; - elseif ($month_current >= 7) $q=3; - elseif ($month_current >= 4) $q=2; - else $q=1; + $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); + if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } - if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } - if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } - if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } - if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } -$min = GETPOST("min"); +$min = price2num(GETPOST("min","alpha")); if (empty($min)) $min = 0; // Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit -$modetax = $conf->global->TAX_MODE; -if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"]; +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products +//$modetax = $conf->global->TAX_MODE; +$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local; +$modetax=$conf->global->$calc; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); if (empty($modetax)) $modetax=0; // Security check @@ -93,122 +96,123 @@ $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -/** + + +/* * View */ + +$form=new Form($db); +$company_static=new Societe($db); +$invoice_customer=new Facture($db); +$invoice_supplier=new FactureFournisseur($db); +$expensereport=new ExpenseReport($db); +$product_static=new Product($db); +$payment_static=new Paiement($db); +$paymentfourn_static=new PaiementFourn($db); +$paymentexpensereport_static=new PaymentExpenseReport($db); + $morequerystring=''; $listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); -foreach($listofparams as $param) +foreach ($listofparams as $param) { if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); } -llxHeader('','','','',0,0,'','',$morequerystring); - -$form=new Form($db); - -$company_static=new Societe($db); -$invoice_customer=new Facture($db); -$invoice_supplier=new FactureFournisseur($db); -$product_static=new Product($db); -$payment_static=new Paiement($db); -$paymentfourn_static=new PaiementFourn($db); +llxHeader('',$langs->trans("LocalTaxReport"),'','',0,0,'','',$morequerystring); $fsearch.=' '; $fsearch.=' '; $fsearch.=' '; -$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local; - -if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services -{ - $nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode"); - $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) $prevquarter--; - else { $prevquarter=4; $prevyear--; } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) $nextquarter++; - else { $nextquarter=1; $nextyear++; } - - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='
'.$langs->trans("DepositsAreNotIncluded"); - else $description.='
'.$langs->trans("DepositsAreIncluded"); - $description.=$fsearch; - $builddate=dol_now(); - - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')'; - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("ProductOrService"); - $amountsup=$langs->trans("AmountHT"); - $vatsup=$langs->trans("VATPaid"); - if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')'; +$name=$langs->transcountry($local==1?"LT1ReportByQuarters":"LT2ReportByQuarters", $mysoc->country_code); +$calcmode=''; +if ($modetax == 0) $calcmode=$langs->trans('OptionVATDefault'); +if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); +if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); +$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; +// Set period +$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); +$prevyear=$year_start; $prevquarter=$q; +if ($prevquarter > 1) { + $prevquarter--; +} else { + $prevquarter=4; $prevyear--; } -if ($conf->global->$calc==2) // Invoice for goods, payment for services -{ - $nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode"); - $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) $prevquarter--; - else { $prevquarter=4; $prevyear--; } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) $nextquarter++; - else { $nextquarter=1; $nextyear++; } - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded"); - else $description.=' '.$langs->trans("DepositsAreIncluded"); - $description.=$fsearch; - $builddate=dol_now(); - - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')'; - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("ProductOrService"); - $amountsup=$langs->trans("AmountHT"); - $vatsup=$langs->trans("VATPaid"); - if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')'; +$nextyear=$year_start; $nextquarter=$q; +if ($nextquarter < 4) { + $nextquarter++; +} else { + $nextquarter=1; $nextyear++; } +$description.=$fsearch; +$builddate=dol_now(); + +/*if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.='
'.$langs->trans("DepositsAreNotIncluded"); +} +*/ +if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +// Customers invoices +$elementcust=$langs->trans("CustomersInvoices"); +$productcust=$langs->trans("ProductOrService"); +$amountcust=$langs->trans("AmountHT"); +$vatcust=$langs->trans("VATReceived"); +$namecust=$langs->trans("Name"); +if ($mysoc->tva_assuj) { + $vatcust.=' ('.$langs->trans("ToPay").')'; +} + +// Suppliers invoices +$elementsup=$langs->trans("SuppliersInvoices"); +$productsup=$productcust; +$amountsup=$amountcust; +$vatsup=$langs->trans("VATPaid"); +$namesup=$namecust; +if ($mysoc->tva_assuj) { + $vatsup.=' ('.$langs->trans("ToGetBack").')'; +} + + report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); if($local==1){ $vatcust=$langs->transcountry("LocalTax1", $mysoc->country_code); $vatsup=$langs->transcountry("LocalTax1", $mysoc->country_code); + $vatexpensereport=$langs->transcountry("LocalTax1", $mysoc->country_code); }else{ $vatcust=$langs->transcountry("LocalTax2", $mysoc->country_code); $vatsup=$langs->transcountry("LocalTax2", $mysoc->country_code); + $vatexpensereport=$langs->transcountry("LocalTax2", $mysoc->country_code); } // VAT Received and paid +echo ''; $y = $year_current; $total = 0; $i=0; +$columns = 5; // Load arrays of datas -$x_coll = tax_by_date('localtax' . $local, $db, 0, 0, $date_start, $date_end, $modetax, 'sell'); -$x_paye = tax_by_date('localtax' . $local, $db, 0, 0, $date_start, $date_end, $modetax, 'buy'); - -echo '
'; +$x_coll = tax_by_rate('localtax' . $local, $db, 0, 0, $date_start, $date_end, $modetax, 'sell'); +$x_paye = tax_by_rate('localtax' . $local, $db, 0, 0, $date_start, $date_end, $modetax, 'buy'); if (! is_array($x_coll) || ! is_array($x_paye)) { $langs->load("errors"); if ($x_coll == -1) - print ''; + print ''; else if ($x_coll == -2) - print ''; + print ''; else - print ''; + print ''; } else { @@ -228,6 +232,7 @@ else $invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; $invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; $invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; + $company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); $x_both[$my_coll_rate]['coll']['detail'][] = array( 'id' =>$x_coll[$my_coll_rate]['facid'][$id], 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], @@ -239,20 +244,24 @@ else 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], + 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], + 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], 'localtax1'=> $x_coll[$my_coll_rate]['localtax1_list'][$id], 'localtax2'=> $x_coll[$my_coll_rate]['localtax2_list'][$id], 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], - 'link' =>$invoice_customer->getNomUrl(1,'',12)); + 'link' =>$invoice_customer->getNomUrl(1,'',12) + ); } } // tva paid - foreach(array_keys($x_paye) as $my_paye_rate){ + foreach(array_keys($x_paye) as $my_paye_rate) { $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; - if(!isset($x_both[$my_paye_rate]['coll']['totalht'])){ + if(!isset($x_both[$my_paye_rate]['coll']['totalht'])) { $x_both[$my_paye_rate]['coll']['totalht'] = 0; $x_both[$my_paye_rate]['coll']['vat'] = 0; } @@ -275,35 +284,39 @@ else 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], + 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), 'localtax1'=> $x_paye[$my_paye_rate]['localtax1_list'][$id], 'localtax2'=> $x_paye[$my_paye_rate]['localtax2_list'][$id], 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - 'link' =>$invoice_supplier->getNomUrl(1,'',12)); + 'link' =>$invoice_supplier->getNomUrl(1,'',12) + ); } } //now we have an array (x_both) indexed by rates for coll and paye + //print table headers for this quadri - incomes first + $x_coll_sum = 0; $x_coll_ht = 0; $x_paye_sum = 0; $x_paye_ht = 0; - $span=3; - if ($modetax == 0) $span+=2; + $span=$columns; + if ($modetax != 1) $span+=2; - if($conf->global->$calc ==0 || $conf->global->$calc == 2){ + //if ($modetax == 0 || $modetax == 2) + //{ // Customers invoices print ''; print ''; print ''; - if ($modetax == 0) - { - print ''; - print ''; - } + if ($modetax != 2) print ''; + if ($modetax != 1) print ''; print ''; print ''; print ''; @@ -319,8 +332,6 @@ else if (is_array($x_both[$rate]['coll']['detail'])) { // VAT Rate - $var=true; - if($rate!=0){ print ""; print ''; @@ -328,116 +339,116 @@ else } foreach($x_both[$rate]['coll']['detail'] as $index => $fields) { - if(($local==1 && $fields['localtax1']!=0) || ($local==2 && $fields['localtax2']!=0)){ - // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (! empty($fields['ddate_start'])) $type=1; - if (! empty($fields['ddate_end'])) $type=1; - - - print ''; - - // Ref - print ''; - - // Description - print ''; - // Total HT - if ($modetax == 0) - { - print ''; + + // Ref + print ''; + + // Description + print ''; - } - // Payment - $ratiopaymentinvoice=1; - if ($modetax == 0) - { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + // Total HT + if ($modetax != 2) + { + print ''; + } + + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + print ''; + } + + // Total collected print ''; + + // Localtax + print ''; + print ''; + + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; } - - // Total collected - print ''; - - // Localtax - print ''; - print ''; - - $subtot_coll_total_ht += $temp_ht; - $subtot_coll_vat += $temp_vat; - $x_coll_sum += $temp_vat; } } - } - if($rate!=0){ - // Total customers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } + + // Total customers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) + { + print ''; + print ''; + } + print ''; + print ''; + print ''; } if (count($x_coll) == 0) // Show a total ine if nothing shown @@ -459,15 +470,15 @@ else print ''; print '
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
'.$langs->trans("Error").'
'.$elementcust.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("BI").''.$vatcust.'
'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].''; - if ($fields['pid']) + if(($local==1 && $fields['localtax1']!=0) || ($local==2 && $fields['localtax2']!=0)) { - $product_static->id=$fields['pid']; - $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - } - else - { - if ($type) $text = img_object($langs->trans('Service'),'service'); - else $text = img_object($langs->trans('Product'),'product'); - if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) - { - if ($reg[1]=='DEPOSIT') $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); - elseif ($reg[1]=='CREDIT_NOTE') $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); - else $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); - } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + // Define type + $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (! empty($fields['ddate_start'])) $type=1; + if (! empty($fields['ddate_end'])) $type=1; - // Show range - print_date_range($fields['ddate_start'],$fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) + print '
'.$fields['link'].''; + if ($fields['pid']) { - $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); + $product_static->id=$fields['pid']; + $product_static->ref=$fields['pref']; + $product_static->type=$fields['ptype']; + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + } + else + { + if ($type) $text = img_object($langs->trans('Service'),'service'); + else $text = img_object($langs->trans('Product'),'product'); + if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) + { + if ($reg[1]=='DEPOSIT') $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); + elseif ($reg[1]=='CREDIT_NOTE') $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); + else $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + } + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + + // Show range + print_date_range($fields['ddate_start'],$fields['ddate_end']); } print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) + { + $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); + } + print ''; + if ($fields['payment_amount'] && $fields['ftotal_ttc']) + { + $payment_static->id=$fields['payment_id']; + print $payment_static->getNomUrl(2); + } + if ($type == 0) + { + print $langs->trans("NotUsedForGoods"); + } + else { + print price($fields['payment_amount']); + if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } + print ''; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) - { - $payment_static->id=$fields['payment_id']; - print $payment_static->getNomUrl(2); - } - if ($type == 0) - { - print $langs->trans("NotUsedForGoods"); - } - else { - print price($fields['payment_amount']); - if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice*100,2).'%)'; - } + $temp_ht=$fields['totalht']; + if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + print price(price2num($temp_ht,'MT')); print ''; + $temp_vat= $local==1?$fields['localtax1']:$fields['localtax2']; + print price(price2num($temp_vat,'MT')); + //print price($fields['vat']); + print '
'; - $temp_ht=$fields['totalht']; - if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; - print price(price2num($temp_ht,'MT')); - print ''; - $temp_vat= $local==1?$fields['localtax1']:$fields['localtax2']; - print price(price2num($temp_vat,'MT')); - //print price($fields['vat']); - print '
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
 
'; $diff=$x_coll_sum; - } + //} - if($conf->global->$calc ==0 || $conf->global->$calc == 1){ + //if($conf->global->$calc ==0 || $conf->global->$calc == 1){ echo ''; //print table headers for this quadri - expenses now print ''; print ''; print ''; - if ($modetax == 0) + if ($modetax != 1) { print ''; print ''; @@ -481,9 +492,8 @@ else $subtot_paye_total_ht = 0; $subtot_paye_vat = 0; - if(is_array($x_both[$rate]['paye']['detail'])) + if (is_array($x_both[$rate]['paye']['detail'])) { - $var=true; if($rate!=0){ print ""; print ''; @@ -491,149 +501,144 @@ else } foreach($x_both[$rate]['paye']['detail'] as $index=>$fields) { - if(($local==1 && $fields['localtax1']!=0) || ($local==2 && $fields['localtax2']!=0)){ - // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (! empty($fields['ddate_start'])) $type=1; - if (! empty($fields['ddate_end'])) $type=1; - - - print ''; - - // Ref - print ''; - - // Description - print ''; - // Total HT - if ($modetax == 0) - { - print ''; + + // Ref + print ''; + + // Description + print ''; - } - - // Payment - $ratiopaymentinvoice=1; - if ($modetax == 0) - { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); - print ''; + + // Total HT + if ($modetax != 2) + { + print ''; + } + + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + print ''; + } + + // VAT paid + print ''; + + // Localtax + print ''; + print ''; + + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; } - - // VAT paid - print ''; - - // Localtax - print ''; - print ''; - - $subtot_paye_total_ht += $temp_ht; - $subtot_paye_vat += $temp_vat; - $x_paye_sum += $temp_vat; } } - } - if($rate!=0){ - // Total suppliers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } + + // Total suppliers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) + { + print ''; + print ''; + } + print ''; + print ''; + print ''; } - if (count($x_paye) == 0) // Show a total ine if nothing shown - { - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; + if (count($x_paye) == 0) { // Show a total line if nothing shown + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; } print '
'.$elementsup.''.$productsup.''.$amountsup.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')
'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].''; - if ($fields['pid']) + if(($local==1 && $fields['localtax1']!=0) || ($local==2 && $fields['localtax2']!=0)) { - $product_static->id=$fields['pid']; - $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - } - else - { - if ($type) $text = img_object($langs->trans('Service'),'service'); - else $text = img_object($langs->trans('Product'),'product'); - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + // Define type + $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (! empty($fields['ddate_start'])) $type=1; + if (! empty($fields['ddate_end'])) $type=1; - // Show range - print_date_range($fields['ddate_start'],$fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) + print '
'.$fields['link'].''; + if ($fields['pid']) { - //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; - $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); - //print ' ('.round($ratiolineinvoice*100,2).'%)'; - } - print ''; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) - { - $paymentfourn_static->id=$fields['payment_id']; - print $paymentfourn_static->getNomUrl(2); - } - if ($type == 0) - { - print $langs->trans("NotUsedForGoods"); + $product_static->id=$fields['pid']; + $product_static->ref=$fields['pref']; + $product_static->type=$fields['ptype']; + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); } else { - print price($fields['payment_amount']); - if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + if ($type) $text = img_object($langs->trans('Service'),'service'); + else $text = img_object($langs->trans('Product'),'product'); + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + + // Show range + print_date_range($fields['ddate_start'],$fields['ddate_end']); } print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) + { + //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; + $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); + //print ' ('.round($ratiolineinvoice*100,2).'%)'; + } + print ''; + if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + if ($fields['payment_amount'] && $fields['ftotal_ttc']) + { + $paymentfourn_static->id=$fields['payment_id']; + print $paymentfourn_static->getNomUrl(2); + } + if ($type == 0) + { + print $langs->trans("NA"); + } + else + { + print price(price2num($fields['payment_amount'],'MT')); + if (isset($fields['payment_amount'])) { + print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } + } + print ''; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + print price(price2num($temp_ht,'MT'),1); + print ''; + $temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;; + print price(price2num($temp_vat,'MT'),1); + //print price($fields['vat']); + print '
'; - $temp_ht=$fields['totalht']; - if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; - print price(price2num($temp_ht,'MT')); - print ''; - $temp_vat= $local==1?$fields['localtax1']:$fields['localtax2']; - print price(price2num($temp_vat,'MT')); - //print price($fields['vat']); - print '
 '.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
 '.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
 '.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
 '.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'; - $diff=$x_paye_sum; - } + //} - if($conf->global->$calc ==0){$diff=$x_coll_sum - $x_paye_sum;} - echo ''; - // Total to pay - print '

'; - print '
'; - //$diff = $local==1?$x_coll_sum:$x_paye_sum; - print ''; - print ''; - print '\n"; - print "\n"; - - echo '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
'; + // Total to pay + print '

'; + print ''; + $diff = $x_coll_sum - $x_paye_sum; + print ''; + print ''; + print '\n"; + print "\n"; $i++; } +print '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
'; llxFooter(); $db->close(); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 4f17a4444f5..6c9f8014e19 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -$langs->load('companies'); -$langs->load('bills'); -$langs->load('banks'); -$langs->load('multicurrency'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm'); @@ -504,18 +502,18 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('CheckTransmitter'); print ' ('.$langs->trans("ChequeMaker").')'; print ''; - print ''; + print ''; // Bank name print ''.$langs->trans('Bank'); print ' ('.$langs->trans("ChequeBank").')'; print ''; - print ''; + print ''; // Comments print ''.$langs->trans('Comments').''; print ''; - print ''; + print ''; print ''; @@ -819,7 +817,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if (! GETPOST('action','aZ09')) { if ($page == -1) $page = 0 ; - $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; + $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) $sortorder='DESC'; @@ -827,7 +825,7 @@ if (! GETPOST('action','aZ09')) $sql = 'SELECT p.datep as dp, p.amount, f.amount as fa_amount, f.facnumber'; $sql.=', f.rowid as facid, c.libelle as paiement_type, p.num_paiement'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id AND c.entity IN (' . getEntity('c_paiement').')'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql.= ', '.MAIN_DB_PREFIX.'facture as f'; $sql.= ' WHERE p.fk_facture = f.rowid'; $sql.= ' AND f.entity IN (' . getEntity('facture').')'; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 2a8267aefb5..656d6c673f2 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load('bills'); -$langs->load('banks'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('bills','banks','companies')); $id=GETPOST('id','int'); $ref=GETPOST('ref', 'alpha'); @@ -222,57 +221,64 @@ print '
'; print ''."\n"; // Date payment -print ''; // Payment type (VIR, LIQ, ...) $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$object->type_code)?$langs->trans("PaymentType".$object->type_code):$object->type_libelle; -print ''; - -// Payment numero -print ''; - -// Amount -print ''; - -// Note -print ''; +print ''; $disable_delete = 0; // Bank account if (! empty($conf->banque->enabled)) { - if ($object->fk_account > 0) - { - $bankline=new AccountLine($db); - $bankline->fetch($object->bank_line); - if ($bankline->rappro) - { - $disable_delete = 1; - $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment")); - } + if ($object->fk_account > 0) + { + $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 ''; - print ''; - print ''; - - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + print $accountstatic->getNomUrl(1); + print ''; + print ''; + } +} +// Payment numero +/* +$titlefield=$langs->trans('Numero').' ('.$langs->trans("ChequeOrTransferNumber").')'; +print ''; + +// Check transmitter +$titlefield=$langs->trans('CheckTransmitter').' ('.$langs->trans("ChequeMaker").')'; +print ''; + +// Bank name +$titlefield=$langs->trans('Bank').' ('.$langs->trans("ChequeBank").')'; +print ''; +*/ + +// Bank account +if (! empty($conf->banque->enabled)) +{ + if ($object->fk_account > 0) + { if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) { dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php'); @@ -280,15 +286,30 @@ if (! empty($conf->banque->enabled)) $bordereau->fetch($bankline->fk_bordereau); print ''; - print ''; - print ''; + print ''; - print ''; + print ''; + print ''; } - } + } + + print ''; + print ''; + print ''; + print ''; } +// Comments +print ''; + +// Amount +print ''; + print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; +print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print '
'.$langs->trans('PaymentMode').''.$labeltype.'
'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; -print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); -print '
'.$langs->trans('Amount').''.price($object->amount,'',$langs,0,-1,-1,$conf->currency).'
'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).''; -print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); -print '
'.$langs->trans('PaymentMode').''.$labeltype.'
'.$langs->trans('BankTransactionLine').''; - print $bankline->getNomUrl(1,0,'showconciliated'); - print '
'.$langs->trans('BankAccount').''; + print '
'.$langs->trans('BankAccount').''; $accountstatic=new Account($db); $accountstatic->fetch($bankline->fk_account); - print $accountstatic->getNomUrl(1); - print '
'.$form->editfieldkey($titlefield,'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; +print $form->editfieldval($titlefield,'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); +print '
'.$form->editfieldkey($titlefield,'chqemetteur',$object->,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; +print $form->editfieldval($titlefield,'chqemetteur',$object->aaa,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('ChequeMakeUpdateSucceeded')); +print '
'.$form->editfieldkey($titlefield,'chqbank',$object->aaa,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; +print $form->editfieldval($titlefield,'chqbank',$object->aaa,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('ChequeBankUpdateSucceeded')); +print '
'.$langs->trans('CheckReceipt').''; + print ''.$langs->trans('CheckReceipt').''; print $bordereau->getNomUrl(1); - print '
'.$langs->trans('BankTransactionLine').''; + print $bankline->getNomUrl(1,0,'showconciliated'); + print '
'.$form->editfieldkey("Comments",'note',$object->note,$object,$user->rights->facture->paiement).''; +print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea:'.ROWS_3.':90%'); +print '
'.$langs->trans('Amount').''.price($object->amount,'',$langs,0,-1,-1,$conf->currency).'
'; print ''; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 8a165ebe811..69f3bd102df 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -32,11 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load('bills'); -$langs->load('companies'); -$langs->load('compta'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'compta')); $id =GETPOST('id','int'); $ref=GETPOST('ref', 'alpha'); @@ -54,7 +51,7 @@ $page=GETPOST('page', 'int'); if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="b.dateo,b.rowid"; if (empty($page) || $page == -1) { $page = 0; } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; $dir=$conf->bank->dir_output.'/checkdeposits/'; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 9ddbd0b5cf6..527bd05e3a1 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -28,10 +28,8 @@ require('../../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -70,7 +68,6 @@ print "\n"; if ($resql) { - $var=false; if ($row = $db->fetch_row($resql) ) { $num = $row[0]; @@ -94,7 +91,7 @@ $max=10; $sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.ref as ref,"; $sql.= " bc.statut, bc.nbcheque,"; -$sql.= " ba.ref, ba.label, ba.rowid as bid, ba.number, ba.currency_code, ba.account_number, ba.accountancy_journal,"; +$sql.= " ba.ref, ba.label, ba.rowid as bid, ba.number, ba.currency_code, ba.account_number, ba.fk_accountancy_journal,"; $sql.= " aj.code"; $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc, ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_journal as aj ON aj.rowid = ba.fk_accountancy_journal"; @@ -116,7 +113,6 @@ if ($resql) print ''.$langs->trans("Status").''; print "\n"; - $var=true; while ( $objp = $db->fetch_object($resql) ) { $checkdepositstatic->id=$objp->rowid; @@ -130,6 +126,7 @@ if ($resql) $accountstatic->currency_code=$objp->currency_code; $accountstatic->account_number=$objp->account_number; $accountstatic->accountancy_journal=$objp->code; + $accountstatic->fk_accountancy_journal=$objp->fk_accountancy_journal; print ''."\n"; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 76c52215281..800f40b9694 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -43,7 +42,7 @@ $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; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -117,6 +116,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -131,6 +135,14 @@ if ($resql) if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $newcardbutton=''; + if ($user->rights->banque->cheque) + { + $newcardbutton = ''.$langs->trans('NewCheckDeposit').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + print ''; if ($optioncss != '') print ''; print ''; @@ -140,7 +152,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', '', '', $limit); + print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', 0, $newcardbutton, '', $limit); $moreforfilter=''; @@ -183,7 +195,6 @@ if ($resql) if ($num > 0) { - $var=true; while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index b089cac6aab..59f13023b24 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -107,7 +107,7 @@ class Cpaiement // Insert request $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '('; - $sql.= 'id,'; + $sql.= 'entity,'; $sql.= 'code,'; $sql.= 'libelle,'; $sql.= 'type,'; @@ -118,7 +118,7 @@ class Cpaiement $sql .= ') VALUES ('; - $sql .= ' '.(! isset($this->id)?'NULL':$this->id).','; + $sql .= ' '.(! isset($this->entity)?getEntity('c_paiement'):$this->entity).','; $sql .= ' '.(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").','; $sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").','; $sql .= ' '.(! isset($this->type)?'NULL':$this->type).','; @@ -186,7 +186,8 @@ class Cpaiement $sql .= " t.module"; $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; if (null !== $ref) { - $sql .= ' WHERE t.code = ' . '\'' . $ref . '\''; + $sql .= ' WHERE t.entity IN ('.getEntity('c_paiement').')'; + $sql .= ' AND t.code = ' . '\'' . $ref . '\''; } else { $sql .= ' WHERE t.id = ' . $id; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 4d23637dfe7..8b71cf40064 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -59,6 +59,7 @@ class Paiement extends CommonObject // de llx_paiement qui est lie aux types de //paiement de llx_c_paiement var $num_paiement; // Numero du CHQ, VIR, etc... + var $num_payment; // Numero du CHQ, VIR, etc... var $bank_account; // Id compte bancaire du paiement var $bank_line; // Id de la ligne d'ecriture bancaire // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) @@ -88,7 +89,7 @@ class Paiement extends CommonObject { $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.= ' p.num_paiement as num_payment, p.note,'; $sql.= ' b.fk_account'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; @@ -110,7 +111,9 @@ class Paiement extends CommonObject $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; + $this->numero = $obj->num_payment; // deprecated + $this->num_paiement = $obj->num_payment; // deprecated + $this->num_payment = $obj->num_payment; $this->montant = $obj->amount; // deprecated $this->amount = $obj->amount; $this->note = $obj->note; @@ -531,7 +534,7 @@ class Paiement extends CommonObject { if ($accountid <= 0) { - $this->error='Bad value for parameter accountid'; + $this->error='Bad value for parameter accountid='.$accountid; dol_syslog(get_class($this).'::addPaymentToBank '.$this->error, LOG_ERR); return -1; } diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index d0bda152b21..9f55761dba0 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies')); $id=GETPOST('id'); $ref=GETPOST('ref', 'alpha'); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 595c9e868dc..064ca877c3f 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -6,6 +6,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2018 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 @@ -34,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -$langs->load("bills"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta')); // Security check $facid = GETPOST('facid','int'); @@ -59,7 +60,7 @@ $search_amount=GETPOST("search_amount",'alpha'); // alpha because we must be $search_company=GETPOST("search_company",'alpha'); $search_payment_num=GETPOST('search_payment_num','alpha'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -138,7 +139,7 @@ else $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."paiement as p"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id AND c.entity IN (" . getEntity('c_paiement') . ")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; $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"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; @@ -191,6 +192,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -229,21 +235,21 @@ if ($resql) // Lines for filters fields print ''; print ''; - print ''; + print ''; print ''; print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; $formother->select_year($year?$year:-1,'year',1, 20, 5); print ''; print ''; - print ''; + print ''; print ''; print ''; $form->select_types_paiements($search_paymenttype,'search_paymenttype','',2,1,1); print ''; print ''; - print ''; + print ''; print ''; if (! empty($conf->banque->enabled)) { @@ -252,7 +258,7 @@ if ($resql) print ''; } print ''; - print ''; + print ''; print ''; print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); @@ -278,7 +284,7 @@ if ($resql) print_liste_field_titre("Amount",$_SERVER["PHP_SELF"],"p.amount","",$param,'align="right"',$sortfield,$sortorder); //print_liste_field_titre("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder); - $parameters=array(); + $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php index 7e16b525233..e60f65f924e 100644 --- a/htdocs/compta/paiement/tovalidate.php +++ b/htdocs/compta/paiement/tovalidate.php @@ -24,6 +24,7 @@ require '../../main.inc.php'; +// Load translation files required by the page $langs->load("bills"); // Security check @@ -38,7 +39,7 @@ if ($user->societe_id > 0) } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); $page = GETPOST('page','int'); @@ -85,6 +86,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1,$offset); @@ -94,7 +100,6 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - $var=True; print_barre_liste($langs->trans("ReceivedCustomersPaymentsToValid"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num); diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index e966eba4a47..cadf897c57f 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->load("bills"); $chid=GETPOST("id", 'int'); diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index ea9bc5af42a..b395016aeed 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load('bills'); -$langs->load('banks'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'companies')); // Security check $id=GETPOST("id",'int'); @@ -245,13 +244,10 @@ if ($resql) if ($num > 0) { - $var=True; - while ($i < $num) { $objp = $db->fetch_object($resql); - print ''; // Ref print ''; diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 9d3da39e5c3..0cbaa9ce55e 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -28,16 +28,15 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("widthdrawals"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'widthdrawals')); // Security check $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'prelevement','','','bons'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); $page = GETPOST('page','int'); @@ -87,6 +86,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1,$offset); @@ -101,6 +105,14 @@ if ($result) $selectedfields=''; + $newcardbutton=''; + if ($user->rights->prelevement->bons->creer) + { + $newcardbutton = ''.$langs->trans('NewStandingOrder').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + // Lines of title fields print ''; if ($optioncss != '') print ''; @@ -112,7 +124,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit); $moreforfilter=''; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index ed0977ebabf..343a45472b6 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); if (!$user->rights->prelevement->bons->lire) accessforbidden(); @@ -322,6 +322,11 @@ if ($id > 0 || $ref) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index d0aa788fe48..245b25be3b6 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2014-2016 Ferran Marcet + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -98,14 +99,6 @@ class BonPrelevement extends CommonObject $this->methodes_trans[0] = "Internet"; $this->_fetched = 0; - - - $langs->load("withdrawals"); - $this->labelstatut[0]=$langs->trans("StatusWaiting"); - $this->labelstatut[1]=$langs->trans("StatusTrans"); - $this->labelstatut[2]=$langs->trans("StatusCredited"); - - return 1; } /** @@ -726,16 +719,12 @@ class BonPrelevement extends CommonObject $sql = "SELECT count(f.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; - //if ($banque || $agence) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr"; $sql.= " WHERE f.fk_statut = 1"; $sql.= " AND f.entity = ".$conf->entity; $sql.= " AND f.rowid = pfd.fk_facture"; $sql.= " AND f.paye = 0"; $sql.= " AND pfd.traite = 0"; $sql.= " AND f.total_ttc > 0"; - //if ($banque || $agence) $sql.= " AND f.fk_soc = sr.rowid"; - //if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'"; - //if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'"; dol_syslog(get_class($this)."::SommeAPrelever"); $resql = $this->db->query($sql); @@ -764,9 +753,10 @@ class BonPrelevement extends CommonObject * @param int $agence dolibarr mysoc bank office (guichet) * @param string $mode real=do action, simu=test only * @param string $format FRST, RCUR or ALL + * @param string $executiondate Date to execute the transfer * @return int <0 if KO, nbre of invoice withdrawed if OK */ - function Create($banque=0, $agence=0, $mode='real', $format='ALL') + function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='') { global $conf,$langs; @@ -780,6 +770,8 @@ class BonPrelevement extends CommonObject $error = 0; $datetimeprev = time(); + //Choice the date of the execution direct debit + if(!empty($executiondate)) $datetimeprev = $executiondate; $month = strftime("%m", $datetimeprev); $year = strftime("%Y", $datetimeprev); @@ -805,9 +797,8 @@ class BonPrelevement extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; - //if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr"; $sql.= " WHERE f.rowid = pfd.fk_facture"; - $sql.= " AND f.entity = ".$conf->entity; + $sql.= " AND f.entity IN (".getEntity('facture').')'; $sql.= " AND s.rowid = f.fk_soc"; //if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc"; $sql.= " AND f.fk_statut = 1"; @@ -1082,7 +1073,7 @@ class BonPrelevement extends CommonObject $this->factures = $factures_prev_id; // Generation of SEPA file $this->filename - $this->generate($format); + $this->generate($format,$executiondate); } dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG); } @@ -1279,9 +1270,10 @@ class BonPrelevement extends CommonObject * File is generated with name this->filename * * @param string $format FRST, RCUR or ALL + * @param string $executiondate Date to execute transfer * @return int 0 if OK, <0 if KO */ - function generate($format='ALL') + function generate($format='ALL',$executiondate='') { global $conf,$langs,$mysoc; @@ -1310,10 +1302,16 @@ class BonPrelevement extends CommonObject */ // SEPA Initialisation $CrLf = "\n"; - $date_actu = dol_now(); + + $now = dol_now(); + + $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); + + $date_actu = $now; + if (!empty($executiondate)) $date_actu=$executiondate; + $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); - $dateTime_ECMA = dol_print_date($date_actu, '%Y-%m-%dT%H:%M:%S'); $fileDebiteurSection = ''; $fileEmetteurSection = ''; $i = 0; @@ -1340,6 +1338,7 @@ class BonPrelevement extends CommonObject $sql.= " AND soc.rowid = f.fk_soc"; $sql.= " AND rib.fk_soc = f.fk_soc"; $sql.= " AND rib.default_rib = 1"; + $sql.= " AND rib.type = 'ban'"; //print $sql; // Define $fileDebiteurSection. One section DrctDbtTxInf per invoice. @@ -1883,48 +1882,52 @@ class BonPrelevement extends CommonObject */ function LibStatut($statut,$mode=0) { - global $langs; + if (empty($this->labelstatut)) + { + global $langs; + $langs->load("withdrawals"); + $this->labelstatut[0]=$langs->trans("StatusWaiting"); + $this->labelstatut[1]=$langs->trans("StatusTrans"); + $this->labelstatut[2]=$langs->trans("StatusCredited"); + } if ($mode == 0) { - return $langs->trans($this->labelstatut[$statut]); + return $this->labelstatut[$statut]; } - if ($mode == 1) { - if ($statut==0) return img_picto($langs->trans($this->labelstatut[$statut]),'statut1').' '.$langs->trans($this->labelstatut[$statut]); - if ($statut==1) return img_picto($langs->trans($this->labelstatut[$statut]),'statut3').' '.$langs->trans($this->labelstatut[$statut]); - if ($statut==2) return img_picto($langs->trans($this->labelstatut[$statut]),'statut6').' '.$langs->trans($this->labelstatut[$statut]); + return $this->labelstatut[$statut]; } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->labelstatut[$statut]),'statut1'); - if ($statut==1) return img_picto($langs->trans($this->labelstatut[$statut]),'statut3'); - if ($statut==2) return img_picto($langs->trans($this->labelstatut[$statut]),'statut6'); + if ($statut==0) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatut[$statut]; + if ($statut==1) return img_picto($this->labelstatut[$statut],'statut3').' '.$this->labelstatut[$statut]; + if ($statut==2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatut[$statut]; } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->labelstatut[$statut]),'statut1'); - if ($statut==1) return img_picto($langs->trans($this->labelstatut[$statut]),'statut3'); - if ($statut==2) return img_picto($langs->trans($this->labelstatut[$statut]),'statut6'); + if ($statut==0) return img_picto($this->labelstatut[$statut],'statut1'); + if ($statut==1) return img_picto($this->labelstatut[$statut],'statut3'); + if ($statut==2) return img_picto($this->labelstatut[$statut],'statut6'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->labelstatut[$statut]),'statut1').' '.$langs->trans($this->labelstatut[$statut]); - if ($statut==1) return img_picto($langs->trans($this->labelstatut[$statut]),'statut3').' '.$langs->trans($this->labelstatut[$statut]); - if ($statut==2) return img_picto($langs->trans($this->labelstatut[$statut]),'statut6').' '.$langs->trans($this->labelstatut[$statut]); + if ($statut==0) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatut[$statut]; + if ($statut==1) return img_picto($this->labelstatut[$statut],'statut3').' '.$this->labelstatut[$statut]; + if ($statut==2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatut[$statut]; } if ($mode == 5) { - if ($statut==0) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut1'); - if ($statut==1) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut3'); - if ($statut==2) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut6'); + if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); + if ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut3'); + if ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); } if ($mode == 6) { - if ($statut==0) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut1'); - if ($statut==1) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut3'); - if ($statut==2) return $langs->trans($this->labelstatut[$statut]).' '.img_picto($langs->trans($this->labelstatut[$statut]),'statut6'); + if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); + if ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut3'); + if ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index cd3aebf62f4..74bd282d606 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -3,6 +3,7 @@ * Copyright (C) 2010-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2018 Nicolas ZABOURI * * 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,11 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("widthdrawals"); -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'widthdrawals', 'companies', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -65,7 +63,9 @@ if ($action == 'create') { // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty $bprev = new BonPrelevement($db); - $result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format); + $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); + + $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format,$executiondate); if ($result < 0) { setEventMessages($bprev->error, $bprev->errors, 'errors'); @@ -90,6 +90,7 @@ if ($action == 'create') /* * View */ +$form = new Form($db); $thirdpartystatic=new Societe($db); $invoicestatic=new Facture($db); @@ -144,23 +145,22 @@ print ''; if ($mesg) print $mesg; print "
\n"; +print ''; +print ''; +if ($nb) { + if ($pricetowithdraw) { + print $langs->trans('ExecutionDate').' '; + print $form->select_date(); + if ($mysoc->isInEEC()) { + print ''; + print ''; + } else { + print '' . $langs->trans("CreateAll") . "\n"; + } -if ($nb) -{ - if ($pricetowithdraw) - { - if ($mysoc->isInEEC()) - { - print ''.$langs->trans("CreateForSepaFRST")."\n"; - print ''.$langs->trans("CreateForSepaRCUR")."\n"; } else { - print ''.$langs->trans("CreateAll")."\n"; - } - } - else - { if ($mysoc->isInEEC()) { print ''.$langs->trans("CreateForSepaFRST")."\n"; @@ -295,8 +295,6 @@ if ($result) print ''.$langs->trans("Date").''.$langs->trans("Amount").''; print ''; - $var=True; - while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 04ec746d7f6..d20f92cb188 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -30,10 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); @@ -129,8 +127,6 @@ if ($resql) print ''; print ''; - $var = True; - $users = array(); while ($i < min($num,$limit)) diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 64811c7604a..2eabd64873d 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -31,11 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("companies"); -$langs->load('withdrawals'); -$langs->load('bills'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bills')); // Securite acces client if ($user->societe_id > 0) accessforbidden(); @@ -170,6 +167,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1,$offset); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 82431e3bdd2..113153bc896 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Securite acces client @@ -169,6 +170,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index f0e335da5cf..c126212f17c 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Security check diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 271ce4da7fe..de99b56eb19 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -33,9 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check $socid = GETPOST('socid','int'); @@ -71,7 +70,6 @@ print '
'; $thirdpartystatic=new Societe($db); $invoicestatic=new Facture($db); $bprev = new BonPrelevement($db); -$var=true; print ''; print ''; @@ -117,7 +115,6 @@ if ($resql) print ''; if ($num) { - $var = True; while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); @@ -184,7 +181,6 @@ if ($result) { $num = $db->num_rows($result); $i = 0; - $var=True; print"\n\n"; print '
'.$langs->trans("Statistics").'
'.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')
'; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 20ac3d18082..721cf62bcd7 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -31,15 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); // Security check if ($user->societe_id > 0) accessforbidden(); -$langs->load("bills"); -$langs->load("withdrawals"); - // Get supervariables $action = GETPOST('action','alpha'); $id = GETPOST('id','int'); diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index ff6fe4e109c..8d657f00221 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("withdrawals"); -$langs->load("companies"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories')); // Security check $socid = GETPOST('socid','int'); @@ -40,7 +38,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'prelevement','','','bons'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); $page = GETPOST('page','int'); @@ -111,6 +109,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1,$offset); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 3c18207f451..c8812bba1a9 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -30,10 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 406c2303b6a..20d213e820b 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -28,10 +28,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 6102c9fd734..b6e2ea26647 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -28,6 +28,7 @@ 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'; +// Load translation files required by the page $langs->load("companies"); if (! empty($conf->facture->enabled)) $langs->load("bills"); @@ -61,6 +62,9 @@ $arrayfields=array( //... ); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('supplierbalencelist','globalcard')); + /* * Actions */ @@ -100,7 +104,7 @@ if ($id > 0) // Invoice list print load_fiche_titre($langs->trans("CustomerPreview")); - print '
'; + print '
'; print ''; if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'],$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); print ''; @@ -253,13 +257,18 @@ if ($id > 0) if (!empty($data['fk_facture'])) print dol_print_date($data['date'],'day'); elseif (!empty($data['fk_paiement'])) print dol_print_date($data['date'],'dayhour'); 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']); + // Balance print '\n"; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 1bbeb9f2f29..c9e32b9a97f 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries','accountancy')); $date_startmonth=GETPOST('date_startmonth','int'); @@ -107,13 +108,13 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } } -// $date_start and $date_end are defined. We force $start_year and $nbofyear +// $date_start and $date_end are defined. We force $year_start and $nbofyear $tmps=dol_getdate($date_start); -$start_year = $tmps['year']; +$year_start = $tmps['year']; $tmpe=dol_getdate($date_end); $year_end = $tmpe['year']; $nbofyear = ($year_end - $start_year) + 1; -//var_dump($start_year." ".$end_year." ".$nbofyear); +//var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour')); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; @@ -218,7 +219,7 @@ if ($date_endyear) $param.='&date_endyear='.$date_startyear; print '
'.$langs->trans("Element").''.$data['link']."'.$data['status'].''.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."'.price($data['balance'])."
'; print ''; -print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 's.nom, s.rowid','',$param,'',$sortfield,$sortorder,'width200 '); +print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid','',$param,'',$sortfield,$sortorder,'width200 '); print_liste_field_titre(''); if ($modecompta == 'BOOKKEEPING') { @@ -253,8 +254,8 @@ if ($modecompta == 'BOOKKEEPING') $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as f"; $sql.= ", ".MAIN_DB_PREFIX."accounting_account as aa"; $sql.= " WHERE f.numero_compte = aa.account_number"; - //$sql.= " AND fk_statut in (1,2)"; $sql.= " AND ".$predefinedgroupwhere; + $sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; $sql.= " AND f.entity = ".$conf->entity; if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'"; @@ -295,7 +296,7 @@ if ($modecompta == 'BOOKKEEPING') if ($showaccountdetail != 'no') { $tmppredefinedgroupwhere="pcg_type = '".$db->escape($objp->pcg_type)."' AND pcg_subtype = '".$db->escape($objp->pcg_subtype)."'"; - $tmppredefinedgroupwhere.= " AND fk_pcg_version = '".$charofaccountstring."'"; + $tmppredefinedgroupwhere.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; //$tmppredefinedgroupwhere.= " AND thirdparty_code = '".$db->escape($objp->name)."'"; // Get cpts of category/group @@ -312,7 +313,7 @@ if ($modecompta == 'BOOKKEEPING') } - if ($showaccountdetail == 'all' || $resultN > 0) + if ($showaccountdetail == 'all' || $resultN <> 0) { print ''; print ''; @@ -822,7 +823,7 @@ else $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.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id AND c.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql.= " WHERE p.entity IN (".getEntity('expensereport').")"; $sql.= " AND p.fk_statut>=5"; @@ -906,7 +907,7 @@ else $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."don as p"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id AND c.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql.= " WHERE p.entity IN (".getEntity('donation').")"; $sql.= " AND fk_statut >= 2"; } diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 26f12e3f7c5..fbbc7a36eef 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -30,6 +30,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries')); $date_startmonth=GETPOST('date_startmonth','int'); @@ -85,13 +86,14 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } } -// $date_start and $date_end are defined. We force $start_year and $nbofyear +// $date_start and $date_end are defined. We force $year_start and $nbofyear $tmps=dol_getdate($date_start); -$start_year = $tmps['year']; +$year_start = $tmps['year']; $tmpe=dol_getdate($date_end); $year_end = $tmpe['year']; -$nbofyear = ($year_end - $start_year) + 1; -//var_dump($start_year." ".$end_year." ".$nbofyear); +$nbofyear = ($year_end - $year_start) + 1; +//var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour')); + // Security check $socid = GETPOST('socid','int'); @@ -376,7 +378,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -409,7 +410,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -443,7 +443,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -474,7 +473,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -537,7 +535,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -600,7 +597,6 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { while ($i < $num) { @@ -647,7 +643,6 @@ if (! empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $m $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); - $var = false; $i = 0; if ($num) { while ($i < $num) { @@ -698,7 +693,7 @@ if (! empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' $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.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id AND c.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql.= " WHERE p.entity IN (".getEntity('expensereport').")"; $sql.= " AND p.fk_statut>=5"; @@ -761,7 +756,7 @@ if (! empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."don as p"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id AND c.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql.= " WHERE p.entity IN (".getEntity('donation').")"; $sql.= " AND fk_statut >= 2"; if (! empty($date_start) && ! empty($date_end)) @@ -775,7 +770,6 @@ if (! empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { @@ -810,32 +804,35 @@ elseif ($modecompta == 'BOOKKEEPING') { if (! empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) { - $subtotal_ht = 0; - $subtotal_ttc = 0; + $predefinedgroupwhere = "("; + //$predefinedgroupwhere.= " (pcg_type = 'EXPENSE' and pcg_subtype in ('PRODUCT','SERVICE'))"; + $predefinedgroupwhere.= " (pcg_type = 'EXPENSE')"; + $predefinedgroupwhere.= " OR "; + //$predefinedgroupwhere.= " (pcg_type = 'INCOME' and pcg_subtype in ('PRODUCT','SERVICE'))"; + $predefinedgroupwhere.= " (pcg_type = 'INCOME')"; + $predefinedgroupwhere.= ")"; + + $charofaccountstring = $conf->global->CHARTOFACCOUNTS; + $charofaccountstring=dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); $sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_account as aa"; $sql.= " WHERE b.numero_compte = aa.account_number AND b.entity = ".$conf->entity; - //$sql.= " AND fk_statut in (1,2)"; - $sql.= " AND ("; - //$sql.= " (pcg_type = 'EXPENSE' and pcg_subtype in ('PRODUCT','SERVICE'))"; - $sql.= " (pcg_type = 'EXPENSE')"; - $sql.= " OR "; - //$sql.= " (pcg_type = 'INCOME' and pcg_subtype in ('PRODUCT','SERVICE'))"; - $sql.= " (pcg_type = 'INCOME')"; - $sql.= ")"; - //$sql.= " AND code_journal in ('VT', 'AC')"; + $sql.= " AND ".$predefinedgroupwhere; + $sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; if (! empty($date_start) && ! empty($date_end)) $sql.= " AND b.doc_date >= '".$db->idate($date_start)."' AND b.doc_date <= '".$db->idate($date_end)."'"; $sql.= " GROUP BY b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, dm"; //print $sql; + $subtotal_ht = 0; + $subtotal_ttc = 0; + dol_syslog("get bookkeeping record"); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); - $var=false; $i = 0; if ($num) { @@ -844,10 +841,13 @@ if (! empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) $obj = $db->fetch_object($result); if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0; - $encaiss[$obj->dm] += $obj->debit; - + if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0; + $encaiss[$obj->dm] += $obj->credit; + $decaiss[$obj->dm] += $obj->debit; if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0; - $encaiss_ttc[$obj->dm] += $obj->credit; + if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0; + $encaiss_ttc[$obj->dm] += 0; + $decaiss_ttc[$obj->dm] += 0; $i++; } @@ -908,7 +908,6 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) } print ''; -$var=True; // Loop on each month $nb_mois_decalage = $conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START-1):0; @@ -926,21 +925,44 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois_modulo,1,$annee_decalage)); print '"; print '"; } @@ -951,7 +973,10 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) // Total $nbcols=0; -print ''; +print ''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { $nbcols+=2; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 8b9cba79b0c..23c7e91b989 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries','accountancy')); $error = 0; @@ -254,9 +255,33 @@ else if ($modecompta=="RECETTES-DEPENSES") else if ($modecompta=="BOOKKEEPING") { - //All categories - $cats = $AccCat->getCats(); - if ($catsCalcule < 0) dol_print_error($db, $AccCat->error, $AccCat->errors); + // Get array of all report groups that are active + $cats = $AccCat->getCats(); // WARNING: Computed groups must be after group they include + + /* + $sql = 'SELECT DISTINCT t.numero_compte as nb FROM '.MAIN_DB_PREFIX.'accounting_bookkeeping as t, '.MAIN_DB_PREFIX.'accounting_account as aa'; + $sql.= " WHERE t.numero_compte = aa.account_number AND aa.fk_accounting_category = 0"; + if (! empty($date_start) && ! empty($date_end)) + $sql.= " AND t.doc_date >= '".$db->idate($date_start)."' AND t.doc_date <= '".$db->idate($date_end)."'"; + if (! empty($month)) { + $sql .= " AND MONTH(t.doc_date) = " . $month; + } + $resql = $db->query($sql); + if ($resql) + { + $num_rows = $db->num_rows($resql); + if ($num_rows) { + + print '
Warning: There is '.$num_rows.' accounts in your ledger table that are not set into a reporting group
'; + $i = 0; + //while ($i < $num) { + // $obj = $db->fetch_object($resql); + // $i++; + //} + } + } + else dol_print_error($db); + */ $j=1; $sommes = array(); @@ -365,7 +390,7 @@ else if ($modecompta=="BOOKKEEPING") $totCat['M'][$k] = 0; } - // Get cpts of category/group + // Set $cpts of with array of accounts in the category/group $cpts = $AccCat->getCptsCat($cat['rowid']); print ""; @@ -373,7 +398,10 @@ else if ($modecompta=="BOOKKEEPING") // Column group print ''; + + // Label of group + print '
 '; - if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) + if ($modecompta == 'BOOKKEEPING') { - print ''.price(price2num($decaiss_ttc[$case],'MT')).''; - if (! isset($totsorties[$annee])) $totsorties[$annee]=0; - $totsorties[$annee]+=$decaiss_ttc[$case]; + if (isset($decaiss[$case]) && $decaiss[$case] != 0) + { + print ''.price(price2num($decaiss[$case],'MT')).''; + if (! isset($totsorties[$annee])) $totsorties[$annee]=0; + $totsorties[$annee]+=$decaiss[$case]; + } + } + else + { + if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) + { + print ''.price(price2num($decaiss_ttc[$case],'MT')).''; + if (! isset($totsorties[$annee])) $totsorties[$annee]=0; + $totsorties[$annee]+=$decaiss_ttc[$case]; + } } print " '; - //if (isset($encaiss_ttc[$case]) && $encaiss_ttc[$case] != 0) - if (isset($encaiss_ttc[$case])) + if ($modecompta == 'BOOKKEEPING') { - print ''.price(price2num($encaiss_ttc[$case],'MT')).''; - if (! isset($totentrees[$annee])) $totentrees[$annee]=0; - $totentrees[$annee]+=$encaiss_ttc[$case]; + if (isset($encaiss[$case])) + { + print ''.price(price2num($encaiss[$case],'MT')).''; + if (! isset($totentrees[$annee])) $totentrees[$annee]=0; + $totentrees[$annee]+=$encaiss[$case]; + } + } + else + { + if (isset($encaiss_ttc[$case])) + { + print ''.price(price2num($encaiss_ttc[$case],'MT')).''; + if (! isset($totentrees[$annee])) $totentrees[$annee]=0; + $totentrees[$annee]+=$encaiss_ttc[$case]; + } } print "
'.$langs->trans("TotalTTC").'
'; +if ($modecompta == 'BOOKKEEPING') print $langs->trans("Total"); +else print $langs->trans("TotalTTC"); +print '
'; print $cat['code']; - print ''; + print ''; print $cat['label']; if (count($cpts) > 0) // Show example of 5 first accounting accounts { @@ -510,4 +538,4 @@ print "
"; print '
'; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 608b5a737b0..45fee127642 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -1,8 +1,8 @@ * Copyright (C) 2014 Laurent Destailleur - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Charlie BENKE + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 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 @@ -19,9 +19,9 @@ */ /** - * \file htdocs/compta/salaries/card.php - * \ingroup salaries - * \brief Page of salaries payments + * \file htdocs/compta/salaries/card.php + * \ingroup salaries + * \brief Page of salaries payments */ require '../../main.inc.php'; @@ -30,13 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; - -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); -$langs->load("users"); -$langs->load("salaries"); -$langs->load('hrm'); +// Load translation files required by the page +$langs->loadLangs(array("compta","banks","bills","users","salaries","hrm")); $id=GETPOST("id",'int'); $action=GETPOST('action','aZ09'); @@ -73,7 +68,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $dateep=dol_mktime(12,0,0, $_POST["dateepmonth"], $_POST["dateepday"], $_POST["dateepyear"]); if (empty($datev)) $datev=$datep; - $type_payment = dol_getIdFromCode($db, GETPOST("paymenttype", 'alpha'), 'c_paiement'); + $type_payment = dol_getIdFromCode($db, GETPOST("paymenttype", 'alpha'), 'c_paiement', 'code', 'id', 1); $object->accountid=GETPOST("accountid") > 0 ? GETPOST("accountid","int") : 0; $object->fk_user=GETPOST("fk_user") > 0 ? GETPOST("fk_user","int") : 0; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index eab661c6614..3a3f34b85b4 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -31,9 +31,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ 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 - public $picto='payment'; + public $element='payment_salary'; //!< Id that identify managed objects + public $table_element='payment_salary'; //!< Name of table without prefix where object is stored + public $picto='payment'; public $tms; public $fk_user; @@ -388,7 +388,11 @@ class PaymentSalary extends CommonObject -abs($this->amount), $this->num_payment, '', - $user + $user, + '', + '', + '', + $this->datev ); // Update fk_bank into llx_paiement. diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php new file mode 100644 index 00000000000..647dc27f4a5 --- /dev/null +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -0,0 +1,164 @@ + + * Copyright (c) 2018 Fidesio + * + * 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/compta/salaries/class/salariesstats.class.php + * \ingroup salaries + * \brief Fichier de la classe de gestion des stats des salaires + */ +include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; +include_once DOL_DOCUMENT_ROOT . '/compta/salaries/class/paymentsalary.class.php'; + +/** + * Classe permettant la gestion des stats des salaires + */ +class SalariesStats extends Stats +{ + public $table_element; + + var $socid; + var $userid; + + var $from; + var $field; + var $where; + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param int $socid Id third party + * @param mixed $userid Id user for filter or array of user ids + * @return void + */ + function __construct($db, $socid=0, $userid=0) + { + global $conf; + + $this->db = $db; + $this->socid = $socid; + $this->userid = $userid; + + $object=new PaymentSalary($this->db); + $this->from = MAIN_DB_PREFIX.$object->table_element; + $this->field='amount'; + + $this->where.= " entity = ".$conf->entity; + if ($this->socid) + { + $this->where.=" AND fk_soc = ".$this->socid; + } + if (is_array($this->userid) && count($this->userid) > 0) $this->where.=' AND fk_user IN ('.join(',',$this->userid).')'; + else if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; + } + + + /** + * Return the number of salary by year + * + * @return array Array of values + */ + function getNbByYear() + { + $sql = "SELECT YEAR(datep) as dm, count(*)"; + $sql.= " FROM ".$this->from; + $sql.= " GROUP BY dm DESC"; + $sql.= " WHERE ".$this->where; + + return $this->_getNbByYear($sql); + } + + + /** + * Return the number of salary by month, for a given year + * + * @param string $year Year to scan + * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month + * @return array Array of values + */ + function getNbByMonth($year, $format=0) + { + $sql = "SELECT MONTH(datep) as dm, count(*)"; + $sql.= " FROM ".$this->from; + $sql.= " WHERE YEAR(datep) = ".$year; + $sql.= " AND ".$this->where; + $sql.= " GROUP BY dm"; + $sql.= $this->db->order('dm','DESC'); + + $res=$this->_getNbByMonth($year, $sql, $format); + //var_dump($res);print '
'; + return $res; + } + + + /** + * Return amount of salaries by month for a given year + * + * @param int $year Year to scan + * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month + * @return array Array of values + */ + function getAmountByMonth($year, $format=0) + { + $sql = "SELECT date_format(datep,'%m') as dm, sum(".$this->field.")"; + $sql.= " FROM ".$this->from; + $sql.= " WHERE date_format(datep,'%Y') = '".$year."'"; + $sql.= " AND ".$this->where; + $sql.= " GROUP BY dm"; + $sql.= $this->db->order('dm','DESC'); + + $res=$this->_getAmountByMonth($year, $sql, $format); + //var_dump($res);print '
'; + return $res; + } + + /** + * Return average amount + * + * @param int $year Year to scan + * @return array Array of values + */ + function getAverageByMonth($year) + { + $sql = "SELECT date_format(datep,'%m') as dm, avg(".$this->field.")"; + $sql.= " FROM ".$this->from; + $sql.= " WHERE date_format(datep,'%Y') = '".$year."'"; + $sql.= " AND ".$this->where; + $sql.= " GROUP BY dm"; + $sql.= $this->db->order('dm','DESC'); + + return $this->_getAverageByMonth($year, $sql); + } + + /** + * Return nb, total and average + * + * @return array Array of values + */ + function getAllByYear() + { + $sql = "SELECT date_format(datep,'%Y') as year, count(*) as nb, sum(".$this->field.") as total, avg(".$this->field.") as avg"; + $sql.= " FROM ".$this->from; + $sql.= " WHERE ".$this->where; + $sql.= " GROUP BY year"; + $sql.= $this->db->order('year','DESC'); + + return $this->_getAllByYear($sql); + } +} + diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 03cef9c07e8..99c34f60815 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -35,11 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; -$langs->load("other"); -$langs->load("users"); -$langs->load("salaries"); -$langs->load('hrm'); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","users","salaries","hrm")); $id = GETPOST('id','int'); $ref = GETPOST('ref', 'alpha'); @@ -118,7 +115,7 @@ if ($object->id) print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
'; print '
'; diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index f911636a7ef..8b8d732e9b8 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -28,17 +28,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("compta"); -$langs->load("salaries"); -$langs->load("bills"); -$langs->load("hrm"); +// Load translation files required by the page +$langs->loadLangs(array("compta","salaries","bills","hrm")); // Security check $socid = GETPOST("socid","int"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'salaries', '', '', ''); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $search_ref = GETPOST('search_ref','int'); $search_user = GETPOST('search_user','alpha'); $search_label = GETPOST('search_label','alpha'); @@ -52,8 +50,8 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortfield) $sortfield="s.datep"; -if (! $sortorder) $sortorder="DESC"; +if (! $sortfield) $sortfield="s.datep,s.rowid"; +if (! $sortorder) $sortorder="DESC,DESC"; $optioncss = GETPOST('optioncss','alpha'); $filtre=$_GET["filtre"]; @@ -105,7 +103,7 @@ $sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.da $sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel,"; $sql.= " pst.code as payment_code"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id AND pst.entity IN (".getEntity('c_paiement').")"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid,"; $sql.= " ".MAIN_DB_PREFIX."user as u"; @@ -150,7 +148,15 @@ if ($result) if ($typeid) $param.='&typeid='.$typeid; if ($optioncss != '') $param.='&optioncss='.$optioncss; - print ''; + $newcardbutton=''; + if ($user->rights->salaries->payment->write) + { + $newcardbutton=''.$langs->trans('NewSalaryPayment').''; + $newcardbutton.= ''; + $newcardbutton.= ''; + } + + print ''; if ($optioncss != '') print ''; print ''; print ''; @@ -159,7 +165,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); print '
'; print ''."\n"; @@ -200,7 +206,7 @@ if ($result) print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"s.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre("Employee",$_SERVER["PHP_SELF"],"u.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"s.label","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"s.datep,s.rowid","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre("PaymentMode",$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder); if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount",$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); diff --git a/htdocs/compta/salaries/info.php b/htdocs/compta/salaries/info.php index ddb79845748..467abe3618c 100644 --- a/htdocs/compta/salaries/info.php +++ b/htdocs/compta/salaries/info.php @@ -28,11 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("compta"); -$langs->load("bills"); -$langs->load("users"); -$langs->load("salaries"); -$langs->load('hrm'); +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","users","salaries","hrm")); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/salaries/stats/index.php b/htdocs/compta/salaries/stats/index.php new file mode 100644 index 00000000000..3e6fd56a266 --- /dev/null +++ b/htdocs/compta/salaries/stats/index.php @@ -0,0 +1,294 @@ + + * Copyright (C) 2018 Fidesio + * + * 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/compta/salaries/stats/index.php + * \ingroup salaries + * \brief Page for statistics of module salaries + */ + +require '../../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salariesstats.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("salaries","companies")); + +$WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); +$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); + +$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0; +$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0; +$id = GETPOST('id','int'); + +// Security check +$socid = GETPOST("socid","int"); +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'salaries', '', '', ''); + +// Other security check +$childids = $user->getAllChildIds(); +$childids[]=$user->id; +if ($userid > 0) +{ + if (empty($user->rights->salaries->payment->readall) && ! in_array($userid, $childids)) + { + accessforbidden(); + exit; + } +} + +$nowyear=strftime("%Y", dol_now()); +$year = GETPOST('year')>0?GETPOST('year'):$nowyear; +//$startyear=$year-2; +$startyear=$year-1; +$endyear=$year; + + +/* + * View + */ + +$form=new Form($db); + + +llxHeader(); + +$title=$langs->trans("SalariesStatistics"); +$dir=$conf->salaries->dir_temp; + +print load_fiche_titre($title, $mesg); + +dol_mkdir($dir); + +$useridtofilter=$userid; // Filter from parameters +if (empty($useridtofilter)) +{ + $useridtofilter=$childids; + if (! empty($user->rights->salaries->payment->readall)) $useridtofilter=0; +} + +$stats = new SalariesStats($db, $socid, $useridtofilter); + + +// Build graphic number of object +// $data = array(array('Lib',val1,val2,val3),...) +//print "$endyear, $startyear"; +$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear); +//var_dump($data); + +$filenamenb = $dir."/salariesnbinyear-".$year.".png"; +$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&file=salariesnbinyear-'.$year.'.png'; + +$px1 = new DolGraph(); +$mesg = $px1->isGraphKo(); +if (! $mesg) +{ + $px1->SetData($data); + $px1->SetPrecisionY(0); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px1->SetLegend($legend); + $px1->SetMaxValue($px1->GetCeilMaxValue()); + $px1->SetWidth($WIDTH); + $px1->SetHeight($HEIGHT); + $px1->SetYLabel($langs->trans("Number")); + $px1->SetShading(3); + $px1->SetHorizTickIncrement(1); + $px1->SetPrecisionY(0); + $px1->mode='depth'; + $px1->SetTitle($langs->trans("NumberByMonth")); + + $px1->draw($filenamenb,$fileurlnb); +} + +// Build graphic amount of object +$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); +//var_dump($data); +// $data = array(array('Lib',val1,val2,val3),...) + +$filenameamount = $dir."/salariesamountinyear-".$year.".png"; +$fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&file=salariesamountinyear-'.$year.'.png'; + +$px2 = new DolGraph(); +$mesg = $px2->isGraphKo(); +if (! $mesg) +{ + $px2->SetData($data); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px2->SetLegend($legend); + $px2->SetMaxValue($px2->GetCeilMaxValue()); + $px2->SetMinValue(min(0,$px2->GetFloorMinValue())); + $px2->SetWidth($WIDTH); + $px2->SetHeight($HEIGHT); + $px2->SetYLabel($langs->trans("Amount")); + $px2->SetShading(3); + $px2->SetHorizTickIncrement(1); + $px2->SetPrecisionY(0); + $px2->mode='depth'; + $px2->SetTitle($langs->trans("AmountTotal")); + + $px2->draw($filenameamount,$fileurlamount); +} + + +$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); + +$filename_avg = $dir."/salariesaverageinyear-".$year.".png"; +$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&file=salariesaverageinyear-'.$year.'.png'; + +$px3 = new DolGraph(); +$mesg = $px3->isGraphKo(); +if (! $mesg) +{ + $px3->SetData($data); + $i = $startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px3->SetLegend($legend); + $px3->SetYLabel($langs->trans("AmountAverage")); + $px3->SetMaxValue($px3->GetCeilMaxValue()); + $px3->SetMinValue($px3->GetFloorMinValue()); + $px3->SetWidth($WIDTH); + $px3->SetHeight($HEIGHT); + $px3->SetShading(3); + $px3->SetHorizTickIncrement(1); + $px3->SetPrecisionY(0); + $px3->mode='depth'; + $px3->SetTitle($langs->trans("AmountAverage")); + + $px3->draw($filename_avg,$fileurl_avg); +} + + +// Show array +$data = $stats->getAllByYear(); +$arrayyears=array(); +foreach($data as $val) { + $arrayyears[$val['year']]=$val['year']; +} +if (! count($arrayyears)) $arrayyears[$nowyear]=$nowyear; + + +$h=0; +$head = array(); +$head[$h][0] = DOL_URL_ROOT . '/compta/salaries/stats/index.php'; +$head[$h][1] = $langs->trans("ByMonthYear"); +$head[$h][2] = 'byyear'; +$h++; + +complete_head_from_modules($conf,$langs,null,$head,$h,'trip_stats'); + +dol_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1); + + +print '
'; + + +// Show filter box +print ''; +print '
'; +print ''; +// User +print ''; +// Year +print ''; +print ''; +print '
'.$langs->trans("Filter").'
'.$langs->trans("User").''; +print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); +print '
'.$langs->trans("Year").''; +if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; +arsort($arrayyears); +print $form->selectarray('year',$arrayyears,$year,0); +print '
'; +print ''; +print '

'; + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +$oldyear=0; +foreach ($data as $val) +{ + $year = $val['year']; + while ($year && $oldyear > $year+1) + { + // If we have empty year + $oldyear--; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $oldyear=$year; +} + +print '
'.$langs->trans("Year").''.$langs->trans("Number").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
'.$oldyear.'000
'.$year.''.$val['nb'].''.price(price2num($val['total'],'MT'),1).''.price(price2num($val['avg'],'MT'),1).'
'; + + +print '
'; + + +// Show graphs +print '
'; +if ($mesg) { print $mesg; } +else { + print $px1->show(); + print "
\n"; + print $px2->show(); + print "
\n"; + print $px3->show(); +} +print '
'; + + +print '
'; +print '
'; + + +dol_fiche_end(); + + +llxFooter(); + +$db->close(); diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 23e3494a25d..85e555de468 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -38,8 +38,8 @@ if (! empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; } -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); @@ -327,13 +327,23 @@ if ($action == 'create') // Date end period print ''; print ''; - print $langs->trans("PeriodEndDate"); + print $form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")); print ''; print ''; print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); print ''; print ''; + // Date due + print ''; + print ''; + print $langs->trans("DateDue"); + print ''; + print ''; + print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print ''; + print "\n"; + // Amount print ''; print ''; @@ -370,16 +380,6 @@ if ($action == 'create') print ''; } - // Date due - print ''; - print ''; - print $langs->trans("DateDue"); - print ''; - print ''; - print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); - print ''; - print "\n"; - print ''; dol_fiche_end(); @@ -496,7 +496,7 @@ if ($id > 0) print ""; // Period end date - print "".$langs->trans("PeriodEndDate").""; + print "".$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).""; print ""; if ($action == 'edit') { @@ -586,7 +586,7 @@ if ($id > 0) $sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge 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'; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepaiement = c.id AND c.entity IN (" . getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepaiement = c.id"; $sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql.= " WHERE p.fk_charge = ".$id; $sql.= " AND p.fk_charge = cs.rowid"; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 2d75584cbda..65e6085a650 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -83,7 +83,7 @@ class ChargeSociales extends CommonObject $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as cs"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_chargesociales as c ON cs.fk_type = c.id"; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON cs.fk_mode_reglement = p.id AND p.entity IN ('.getEntity('c_paiement').')'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON cs.fk_mode_reglement = p.id'; $sql.= ' WHERE cs.entity IN ('.getEntity('tax').')'; if ($ref) $sql.= " AND cs.rowid = ".$ref; else $sql.= " AND cs.rowid = ".$id; @@ -192,7 +192,7 @@ class ChargeSociales extends CommonObject $this->id=$this->db->last_insert_id(MAIN_DB_PREFIX."chargesociales"); //dol_syslog("ChargesSociales::create this->id=".$this->id); - $result=$this->call_trigger('PAYMENTSOCIALCONTRIBUTION_CREATE',$user); + $result=$this->call_trigger('SOCIALCONTRIBUTION_CREATE',$user); if ($result < 0) $error++; if(empty($error)) { @@ -464,21 +464,58 @@ class ChargeSociales extends CommonObject /** * Return a link to the object card (with optionaly the picto) * - * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) - * @param int $maxlen Max length of label - * @param int $notooltip 1=Disable tooltip - * @return string String with link + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param int $maxlen Max length of label + * @param int $notooltip 1=Disable tooltip + * @param int $short 1=Return just URL + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with link */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1) { - global $langs; + global $langs, $conf, $user, $form; + + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips $result=''; - if (empty($this->ref)) $this->ref=$this->lib; - $label = $langs->trans("ShowSocialContribution").': '.$this->ref; + $url = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$this->id; - $linkstart = ''; + if ($short) return $url; + + if ($option !== 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } + + + if (empty($this->ref)) $this->ref=$this->lib; + + $label = ''.$langs->trans("ShowSocialContribution").''; + if (! empty($this->ref)) + $label .= '
'.$langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->lib)) + $label .= '
'.$langs->trans('Label') . ': ' . $this->lib; + if (! empty($this->type_libelle)) + $label .= '
'.$langs->trans('Type') . ': ' . $this->type_libelle; + + $linkclose=''; + if (empty($notooltip) && $user->rights->facture->lire) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowSocialContribution"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.=' class="classfortooltip"'; + } + + $linkstart='
'; $linkend=''; $result .= $linkstart; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 60a1a647661..ba9c671f755 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -164,6 +164,9 @@ class PaymentSocialContribution extends CommonObject } + $result = $this->call_trigger('PAYMENTSOCIALCONTRIBUTION_CREATE',$user); + if($result < 0) $error++; + if ($totalamount != 0 && ! $error) { $this->amount=$totalamount; @@ -203,7 +206,7 @@ class PaymentSocialContribution extends CommonObject $sql.= " t.fk_user_modif,"; $sql.= " pt.code as type_code, pt.libelle as type_libelle,"; $sql.= ' b.fk_account'; - $sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as t LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepaiement = pt.id AND pt.entity IN (" . getEntity('c_paiement') . ")"; + $sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as t LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepaiement = pt.id"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; $sql.= " WHERE t.rowid = ".$id; // TODO link on entity of tax; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 0bf1e7f6f13..490dbf3a1fe 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -39,10 +39,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("other"); -$langs->load("companies"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'companies', 'compta', 'bills')); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); @@ -150,7 +148,7 @@ if ($object->id) print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
'; print ''; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 281a0afb377..c5f9cfcbead 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -28,9 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; @@ -42,7 +41,7 @@ $search_label = GETPOST('search_label','alpha'); $search_amount = GETPOST('search_amount','alpha'); $search_status = GETPOST('search_status','int'); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -146,6 +145,14 @@ if ($resql) if ($year) $param.='&year='.$year; if ($typeid) $param.='&typeid='.$typeid; + $newcardbutton=''; + if($user->rights->tax->charges->creer) + { + $newcardbutton=''.$langs->trans('MenuNewSocialContribution'); + $newcardbutton.= ''; + $newcardbutton.= ''; + } + print '
'; if ($optioncss != '') print ''; print ''; @@ -158,11 +165,11 @@ if ($resql) if ($year) { $center=($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":""); - print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); } else { - print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); } if (empty($mysoc->country_id) && empty($mysoc->country_code)) @@ -181,10 +188,10 @@ if ($resql) print ''; // Ref print ''; - print ''; + print ''; print ''; // Label - print ''; + print ''; // Type print ''; $formsocialcontrib->select_type_socialcontrib($typeid,'typeid',1,0,0,'maxwidth100onsmartphone'); @@ -193,7 +200,7 @@ if ($resql) print ' '; // Amount print ''; - print ''; + print ''; print ''; print ' '; // Status @@ -225,13 +232,15 @@ if ($resql) { $obj = $db->fetch_object($resql); + $chargesociale_static->id=$obj->id; + $chargesociale_static->ref=$obj->id; + $chargesociale_static->lib=$obj->libelle; + $chargesociale_static->type_libelle=$obj->type_lib; + print ''; // Ref print ''; - $chargesociale_static->id=$obj->id; - $chargesociale_static->lib=$obj->id; - $chargesociale_static->ref=$obj->id; print $chargesociale_static->getNomUrl(1,'20'); print ''; diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index dfa6439a3f4..1827c1597f8 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -31,8 +31,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index a7c388a26e6..379abd7af09 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -45,7 +45,7 @@ $year=GETPOST("year",'int'); $filtre=GETPOST("filtre",'alpha'); if (! $year && $mode != 'sconly') { $year=date("Y", time()); } -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -133,7 +133,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql.= " ".MAIN_DB_PREFIX."chargesociales as cs,"; $sql.= " ".MAIN_DB_PREFIX."paiementcharge as pc"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id AND pct.entity IN (".getEntity('c_paiement').")"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id"; $sql.= " WHERE cs.fk_type = c.id AND pc.fk_charge = cs.rowid"; $sql.= " AND cs.entity = ".$conf->entity; if ($year > 0) diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php new file mode 100644 index 00000000000..78a9187be57 --- /dev/null +++ b/htdocs/compta/stats/byratecountry.php @@ -0,0 +1,405 @@ + + * + * 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/compta/stats/byratecountry.php + * \brief VAT by rate + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin","accountancy")); + +$modecompta = GETPOST('modecompta','alpha'); + +// Date range +$year=GETPOST("year",'int'); +$month=GETPOST("month",'int'); +if (empty($year)) +{ + $year_current = strftime("%Y",dol_now()); + $month_current = strftime("%m",dol_now()); + $year_start = $year_current; +} else { + $year_current = $year; + $month_current = strftime("%m",dol_now()); + $year_start = $year; +} +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); +// Quarter +if (empty($date_start) || empty($date_end)) // We define date_start and date_end +{ + $q=GETPOST("q","int"); + if (empty($q)) + { + // We define date_start and date_end + $month_start=GETPOST("month")?GETPOST("month"):($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); + $year_end=$year_start; + $month_end=$month_start; + if (! GETPOST("month")) // If month not forced + { + if (! GETPOST('year') && $month_start > $month_current) + { + $year_start--; + $year_end--; + } + $month_end=$month_start-1; + if ($month_end < 1) $month_end=12; + else $year_end++; + } + $date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false); + } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } +} + +// $date_start and $date_end are defined. We force $year_start and $nbofyear +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; + +$tmp_date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; +if ($tmp_date_end < $date_end || $date_end < $date_start) $date_end = $tmp_date_end; + +$min = price2num(GETPOST("min","alpha")); +if (empty($min)) $min = 0; + +// Define modetax (0 or 1) +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products +$modetax = $conf->global->TAX_MODE; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); +if (empty($modetax)) $modetax=0; + +// Security check +$socid = GETPOST('socid','int'); +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'tax', '', '', 'charges'); + + + +/* + * View + */ + +$form=new Form($db); +$company_static=new Societe($db); +$invoice_customer=new Facture($db); +$invoice_supplier=new FactureFournisseur($db); +$expensereport=new ExpenseReport($db); +$product_static=new Product($db); +$payment_static=new Paiement($db); +$paymentfourn_static=new PaiementFourn($db); +$paymentexpensereport_static=new PaymentExpenseReport($db); + +$morequerystring=''; +$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); +foreach ($listofparams as $param) +{ + if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); +} + +llxHeader('',$langs->trans("TurnoverReport"),'','',0,0,'','',$morequerystring); + + +//print load_fiche_titre($langs->trans("VAT"),""); + +//$fsearch.='
'; +$fsearch.=' '; +$fsearch.=' '; +//$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': '; +//$fsearch.=' '; + + +// Show report header +$name=$langs->trans("xxx"); +$calcmode=''; +if ($modetax == 0) $calcmode=$langs->trans('OptionVATDefault'); +if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); +if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); +$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; +// Set period +$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); +$prevyear=$year_start; $prevquarter=$q; +if ($prevquarter > 1) { + $prevquarter--; +} else { + $prevquarter=4; $prevyear--; +} +$nextyear=$year_start; $nextquarter=$q; +if ($nextquarter < 4) { + $nextquarter++; +} else { + $nextquarter=1; $nextyear++; +} +$description.=$fsearch; +$builddate=dol_now(); + +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.='
'.$langs->trans("DepositsAreNotIncluded"); +} +if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +// Customers invoices +$elementcust=$langs->trans("CustomersInvoices"); +$productcust=$langs->trans("ProductOrService"); +$amountcust=$langs->trans("AmountHT"); + +// Suppliers invoices +$elementsup=$langs->trans("SuppliersInvoices"); +$productsup=$productcust; +$amountsup=$amountcust; +$namesup=$namecust; + + + + +// Show report header +$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByVatRate"); + +if ($modecompta=="CREANCES-DETTES") { + $calcmode=$langs->trans("CalcModeDebt"); + $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; + + $description=$langs->trans("RulesCADue"); + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.= $langs->trans("DepositsAreNotIncluded"); + } else { + $description.= $langs->trans("DepositsAreIncluded"); + } + + $builddate=dol_now(); +} else { + $calcmode=$langs->trans("CalcModeEngagement"); + $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; + + $description=$langs->trans("RulesCAIn"); + $description.= $langs->trans("DepositsAreIncluded"); + + $builddate=dol_now(); +} +$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); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; +else $periodlink = ''; + +$description.=' '; + +report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); + +if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') +{ + print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); +} + + +if ($modecompta == 'CREANCES-DETTES') +{ + +print ''; +print ''; +print ''; +print ''; +$i=0; +while($i < 12) +{ + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + print ''; + $i++; +} +print ''; + +$sql = "SELECT fd.tva_tx AS vatrate,"; +$sql .= " fd.product_type AS product_type,"; +$sql .= " cc.label AS country,"; +for ($i = 1; $i <= 12; $i ++) { + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; +} +$sql .= " SUM(fd.total_ht) as total"; +$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; +$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; +$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = f.fk_soc"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; +$sql .= " WHERE f.datef >= '" . $db->idate($date_start) . "'"; +$sql .= " AND f.datef <= '" . $db->idate($date_end) . "'"; +$sql.= " AND f.fk_statut in (1,2)"; +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $sql.= " AND f.type IN (0,1,2,5)"; +} else { + $sql.= " AND f.type IN (0,1,2,3,5)"; +} +$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; +$sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label "; + +dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + $totalpermonth = array(); + while ( $obj = $db->fetch_object($resql)) { + print ''; + if ($obj->product_type == 0) { + print ''; + } else { + print ''; + } + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + } + print ''; + $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; + } + $db->free($resql); + + // Total + print ''; + print ''; + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + } + print ''; + print ''; + +} else { + print $db->lasterror(); // Show last sql error +} + + +print ''; +print ''; +print ''; +$i=0; +while($i < 12) +{ + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + print ''; + $i++; +} +print ''; + +$sql2 = "SELECT ffd.tva_tx AS vatrate,"; +$sql2 .= " ffd.product_type AS product_type,"; +$sql2 .= " cc.label AS country,"; +for($i = 1; $i <= 12; $i ++) { + $sql2 .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; +} +$sql2 .= " SUM(ffd.total_ht) as total"; +$sql2 .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd"; +$sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn"; +$sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = ff.fk_soc"; +$sql2 .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; +$sql2 .= " WHERE ff.datef >= '" . $db->idate($date_start) . "'"; +$sql2 .= " AND ff.datef <= '" . $db->idate($date_end) . "'"; +$sql.= " AND ff.fk_statut in (1,2)"; +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $sql.= " AND ff.type IN (0,1,2,5)"; +} else { + $sql.= " AND ff.type IN (0,1,2,3,5)"; +} +$sql2 .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; +$sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label"; + +//print $sql2; +dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); +$resql2 = $db->query($sql2); +if ($resql2) { + $num = $db->num_rows($resql2); + $totalpermonth = array(); + while ( $obj = $db->fetch_object($resql2)) { + print ''; + if ($obj->product_type == 0) { + print ''; + } else { + print ''; + } + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + } + print ''; + $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; + } + $db->free($resql2); + + // Total + print ''; + print ''; + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + } + print ''; + print ''; +} else { + print $db->lasterror(); // Show last sql error +} +print "
' . $langs->trans("TurnoverbyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("TotalHT") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '' .$obj->country . '' . price($obj->$monthj) . '' . price($obj->total) . '
' . price($totalpermonth[$j]) . '' . price($totalpermonth['total']) . '
' . $langs->trans("PurchasebyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("TotalHT") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '' . $obj->country . '' . price($obj->$monthj) . '' . price($obj->total) . '
' . price($totalpermonth[$j]) . '' . price($totalpermonth['total']) . '
\n"; + +} else { + // $modecompta != 'CREANCES-DETTES' + // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an + // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ? + // Because there is no way to know this, this report is not relevant. + print '
'.$langs->trans("TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant") . '
'; +} + + +llxFooter(); + +$db->close(); diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index f367f8ee436..5c2a50325a7 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("products"); -$langs->load("categories"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array("products","categories","errors",'accountancy')); // Security pack (data & check) $socid = GETPOST('socid','int'); @@ -78,13 +77,13 @@ if (empty($year)) $month_current = strftime("%m",dol_now()); $year_start = $year; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); // Quarter if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $q=GETPOST("q")?GETPOST("q"):0; - if ($q==0) + $q=GETPOST("q","int"); + if (empty($q)) { // We define date_start and date_end $month_start=GETPOST("month")?GETPOST("month"):($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); @@ -103,14 +102,24 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false); } - if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } - if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } - if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } - if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } else { // TODO We define q } +// $date_start and $date_end are defined. We force $year_start and $nbofyear +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; +$nbofyear = ($year_end - $year_start) + 1; + $commonparams=array(); $commonparams['modecompta']=$modecompta; $commonparams['sortorder'] = $sortorder; @@ -154,9 +163,7 @@ $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices") if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeDebt"); - $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - - $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); + $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -168,21 +175,22 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); } else { $calcmode=$langs->trans("CalcModeEngagement"); - $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - - $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); + $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); $builddate=dol_now(); } +$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); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; +else $periodlink = ''; report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode); if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { - print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); + print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -199,17 +207,17 @@ if ($modecompta == 'CREANCES-DETTES') $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label, p.fk_product_type as product_type,"; $sql.= " SUM(l.total_ht) as amount, SUM(l.total_ttc) as amount_ttc,"; $sql.= " SUM(CASE WHEN f.type = 2 THEN -l.qty ELSE l.qty END) as qty"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid"; if ($selected_cat === -2) // Without any category { - $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; } else if ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } - $sql.= " WHERE l.fk_product = p.rowid"; - $sql.= " AND l.fk_facture = f.rowid"; + $sql.= " WHERE l.fk_facture = f.rowid"; $sql.= " AND f.fk_statut in (1,2)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $sql.= " AND f.type IN (0,1,2,5)"; @@ -357,23 +365,21 @@ if ($modecompta == 'CREANCES-DETTES') ); print "\n"; - // Array Data - $var=true; - if (count($name)) { foreach($name as $key=>$value) { print ''; // Product + print ""; $fullname=$name[$key]; - if ($key >= 0) { + if ($key > 0) { $linkname=''.img_object($langs->trans("ShowProduct"),$type[$key]==0?'product':'service').' '.$fullname.''; } else { $linkname=$langs->trans("PaymentsNotLinkedToProduct"); } - - print "".$linkname."\n"; + print $linkname; + print "\n"; // Quantity print ''; @@ -417,11 +423,11 @@ if ($modecompta == 'CREANCES-DETTES') // Total print ''; print ''.$langs->trans("Total").''; - print ''.price($qtytotal).''; - print ' '; + print ''.$qtytotal.''; + print '100%'; print ''.price($catotal_ht).''; print ''.price($catotal).''; - print ' '; + print '100%'; print ''; $db->free($result); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 1fa48738e66..8b1e1f0f106 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->load("accountancy"); $socid = GETPOST('socid','int'); @@ -99,6 +100,12 @@ else { // TODO We define q } +// $date_start and $date_end are defined. We force $year_start and $nbofyear +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; +$nbofyear = ($year_end - $year_start) + 1; $commonparams=array(); $commonparams['modecompta']=$modecompta; @@ -139,9 +146,7 @@ $form=new Form($db); if ($modecompta=="CREANCES-DETTES") { $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeDebt"); - $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $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); - //$periodlink="".img_previous()." ".img_next().""; + $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); @@ -150,14 +155,16 @@ if ($modecompta=="CREANCES-DETTES") { } else { $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); - $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $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); - //$periodlink="".img_previous()." ".img_next().""; + $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } +$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); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; +else $periodlink = ''; + $moreparam=array(); if (! empty($modecompta)) $moreparam['modecompta']=$modecompta; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index f59b6fc454f..1555b3c79ac 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("companies"); -$langs->load("categories"); -$langs->load("bills"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'categories', 'bills', 'compta')); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; @@ -63,18 +61,18 @@ if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta' if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport'); // Date range -$year=GETPOST("year"); -$month=GETPOST("month"); -$search_societe = GETPOST("search_societe"); -$search_zip = GETPOST("search_zip"); -$search_town = GETPOST("search_town"); -$search_country = GETPOST("search_country"); -$date_startyear = GETPOST("date_startyear"); -$date_startmonth = GETPOST("date_startmonth"); -$date_startday = GETPOST("date_startday"); -$date_endyear = GETPOST("date_endyear"); -$date_endmonth = GETPOST("date_endmonth"); -$date_endday = GETPOST("date_endday"); +$year=GETPOST("year",'int'); +$month=GETPOST("month",'int'); +$search_societe = GETPOST("search_societe",'alpha'); +$search_zip = GETPOST("search_zip",'alpha'); +$search_town = GETPOST("search_town",'alpha'); +$search_country = GETPOST("search_country",'alpha'); +$date_startyear = GETPOST("date_startyear",'alpha'); +$date_startmonth = GETPOST("date_startmonth",'alpha'); +$date_startday = GETPOST("date_startday",'alpha'); +$date_endyear = GETPOST("date_endyear",'alpha'); +$date_endmonth = GETPOST("date_endmonth",'alpha'); +$date_endday = GETPOST("date_endday",'alpha'); if (empty($year)) { $year_current = strftime("%Y",dol_now()); @@ -85,13 +83,13 @@ if (empty($year)) $month_current = strftime("%m",dol_now()); $year_start = $year; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); // Quarter if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $q=GETPOST("q")?GETPOST("q"):0; - if ($q==0) + $q=GETPOST("q","int")?GETPOST("q","int"):0; + if (empty($q)) { // We define date_start and date_end $month_start=GETPOST("month")?GETPOST("month"):($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); @@ -120,6 +118,13 @@ else // TODO We define q } +// $date_start and $date_end are defined. We force $year_start and $nbofyear +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; +$nbofyear = ($year_end - $year_start) + 1; + $commonparams=array(); $commonparams['modecompta']=$modecompta; $commonparams['sortorder'] = $sortorder; @@ -167,9 +172,7 @@ if ($modecompta=="CREANCES-DETTES") { $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeDebt"); - $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $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); - //$periodlink=''.img_previous().' '.img_next().''; + $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); @@ -178,14 +181,15 @@ if ($modecompta=="CREANCES-DETTES") } else { $name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); - $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $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); - //$periodlink=''.img_previous().' '.img_next().''; + $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } +$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); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; +else $periodlink = ''; report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode); diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 598de2ba490..dd24a6cd507 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -27,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries')); $date_startmonth=GETPOST('date_startmonth'); @@ -71,7 +72,6 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $month_end=$month_start-1; if ($month_end < 1) $month_end=12; - else $year_end++; } else $month_end=$month_start; $date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false); @@ -85,6 +85,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $userid=GETPOST('userid','int'); $socid = GETPOST('socid','int'); +$tmps=dol_getdate($date_start); +$year_start = $tmps['year']; +$tmpe=dol_getdate($date_end); +$year_end = $tmpe['year']; +$nbofyear = ($year_end - $year_start) + 1; + // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING'; @@ -114,7 +120,7 @@ if ($modecompta=="CREANCES-DETTES") $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; $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); - $periodlink=($year_start?"".img_previous()." ".img_next()."":""); + $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); @@ -128,7 +134,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; $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); - $periodlink=($year_start?"".img_previous()." ".img_next()."":""); + $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); $builddate=dol_now(); @@ -141,7 +147,7 @@ else if ($modecompta=="BOOKKEEPING") $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $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); - $periodlink=($year_start?"".img_previous()." ".img_next()."":""); + $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCATotalSaleJournal"); $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); @@ -493,7 +499,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++) } if (! $total[$annee-1] && $total[$annee]) { - print '+zzzz'.$total[$annee-1].$langs->trans('Inf').'%'; + print '+'.$langs->trans('Inf').'%'; } if (! $total[$annee-1] && ! $total[$annee]) { @@ -551,7 +557,6 @@ print ''; if ($num) { - $var = True; $total_ttc_Rac = $totalam_Rac = $total_Rac = 0; while ($i < $num) { @@ -561,7 +566,7 @@ print ''; $i++; } - print "Facture a encaisser : ".price($total_ttc_Rac)."<-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es"; + print "Facture a encaisser : ".price($total_ttc_Rac)."<-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es"; } $db->free($resql); } @@ -602,7 +607,6 @@ print ''; if ($num) { - $var = True; $total_pr = 0; while ($i < $num) { @@ -611,7 +615,7 @@ print ''; $i++; } - print "Signe et non facture:".price($total_pr)."<-- bug ici, ca devrait exclure le deja facture"; + print "Signe et non facture:".price($total_pr)."<-- bug ici, ca devrait exclure le deja facture"; } $db->free($resql); } @@ -619,7 +623,7 @@ print ''; { dol_print_error($db); } - print "Total CA previsionnel : ".price($total_CA)."<-- bug ici car bug sur les 2 precedents"; + print "Total CA previsionnel : ".price($total_CA)."<-- bug ici car bug sur les 2 precedents"; } print ""; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index e76d96e1a5e..4480682b091 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); $id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); @@ -55,14 +54,22 @@ $hookmanager->initHooks(array('taxvatcard','globalcard')); if ($_POST["cancel"] == $langs->trans("Cancel") && ! $id) { - header("Location: reglement.php"); + header("Location: list.php"); exit; } +if ($action == 'setlib' && $user->rights->tax->charges->creer) +{ + $object->fetch($id); + $result = $object->setValueFrom('label', GETPOST('lib','alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); + if ($result < 0) + setEventMessages($object->error, $object->errors, 'errors'); +} + if ($action == 'setdatev' && $user->rights->tax->charges->creer) { $object->fetch($id); - $object->datev=dol_mktime(12,0,0,$_POST['datevmonth'],$_POST['datevday'],$_POST['datevyear']); + $object->datev=dol_mktime(12,0,0,GETPOST('datevmonth','int'),GETPOST('datevday','int'),GETPOST('datevyear','int')); $result=$object->update($user); if ($result < 0) dol_print_error($db,$object->error); @@ -119,7 +126,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($ret > 0) { $db->commit(); - header("Location: reglement.php"); + header("Location: list.php"); exit; } else @@ -154,7 +161,7 @@ if ($action == 'delete') if ($result >= 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT.'/compta/tva/reglement.php'); + header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php'); exit; } else @@ -172,7 +179,8 @@ if ($action == 'delete') } else { - setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); + $mesg='Error try do delete a line linked to a conciliated bank transaction'; + setEventMessages($mesg, null, 'errors'); } } @@ -180,11 +188,13 @@ if ($action == 'delete') /* * View */ + +$form = new Form($db); + $title=$langs->trans("VAT") . " - " . $langs->trans("Card"); $help_url=''; llxHeader("",$title,$helpurl); -$form = new Form($db); if ($id) { @@ -248,7 +258,7 @@ if ($action == 'create') print $form->select_date($datep,"datep",'','','','add',1,1); print ''; - print ''.$langs->trans("DateValue").''; + print ''.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; print $form->select_date($datev,"datev",'','','','add',1,1); print ''; @@ -261,7 +271,7 @@ if ($action == 'create') print ''.$langs->trans("Label").''; // Amount - print ''.$langs->trans("Amount").''; + print ''.$langs->trans("Amount").''; if (! empty($conf->banque->enabled)) { @@ -306,7 +316,14 @@ if ($id) dol_fiche_head($head, 'card', $langs->trans("VATPayment"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $morehtmlref='
'; + // Label of social contribution + $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); + // Project + $morehtmlref.='
'; + + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); @@ -316,18 +333,17 @@ if ($id) print ''; // Label - print ''; + //print ''; print ""; - print ''; - print ''; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 80242103c51..af330910cdf 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ 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 + public $element='tva'; //!< Id that identify managed objects + public $table_element='tva'; //!< Name of table without prefix where object is stored public $picto='payment'; var $tms; @@ -48,8 +48,6 @@ class Tva extends CommonObject var $fk_user_creat; var $fk_user_modif; - - /** * Constructor * @@ -58,8 +56,6 @@ class Tva extends CommonObject function __construct($db) { $this->db = $db; - $this->element = 'tva'; - $this->table_element = 'tva'; } diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 276f801d05b..ae95d71ca9c 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2006 Yannick Warnier * Copyright (C) 2014 Ferran Marcet * @@ -20,9 +20,9 @@ */ /** - * \file htdocs/compta/tva/clients.php - * \ingroup tax - * \brief Page des societes + * \file htdocs/compta/tva/clients.php + * \ingroup tax + * \brief Page of sales taxes */ require '../../main.inc.php'; @@ -30,78 +30,68 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; -$langs->load("bills"); -$langs->load("compta"); -$langs->load("companies"); -$langs->load("products"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); // Date range -$year=GETPOST("year"); -if (empty($year)) { +$year=GETPOST("year","int"); +if (empty($year)) +{ $year_current = strftime("%Y",dol_now()); $year_start = $year_current; } else { $year_current = $year; $year_start = $year; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); // Quarter -if (empty($date_start) || empty($date_end)) {// We define date_start and date_end +if (empty($date_start) || empty($date_end)) // We define date_start and date_end +{ $q=GETPOST("q"); - if (empty($q)) { - if (isset($_REQUEST["month"])) { - $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); - $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); - } else { - $month_current = strftime("%m",dol_now()); - if ($month_current >= 10) $q=4; - elseif ($month_current >= 7) $q=3; - elseif ($month_current >= 4) $q=2; - else $q=1; + if (empty($q)) + { + if (GETPOST("month")) { $date_start=dol_get_first_day($year_start,GETPOST("month"),false); $date_end=dol_get_last_day($year_start,GETPOST("month"),false); } + else + { + $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); + if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } - if ($q==1) { - $date_start=dol_get_first_day($year_start,1,false); - $date_end=dol_get_last_day($year_start,3,false); - } - if ($q==2) { - $date_start=dol_get_first_day($year_start,4,false); - $date_end=dol_get_last_day($year_start,6,false); - } - if ($q==3) { - $date_start=dol_get_first_day($year_start,7,false); - $date_end=dol_get_last_day($year_start,9,false); - } - if ($q==4) { - $date_start=dol_get_first_day($year_start,10,false); - $date_end=dol_get_last_day($year_start,12,false); + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } } } -$min = price2num(GETPOST("min")); +$min = price2num(GETPOST("min","alpha")); if (empty($min)) $min = 0; // Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = $conf->global->TAX_MODE; -if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"]; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid','int'); -if ($user->societe_id) { - $socid=$user->societe_id; -} +if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); - /* @@ -110,13 +100,19 @@ if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); $form=new Form($db); $company_static=new Societe($db); +$invoice_customer=new Facture($db); +$invoice_supplier=new FactureFournisseur($db); +$expensereport=new ExpenseReport($db); +$product_static=new Product($db); +$payment_static=new Paiement($db); +$paymentfourn_static=new PaiementFourn($db); +$paymentexpensereport_static=new PaymentExpenseReport($db); $morequerystring=''; $listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); -foreach($listofparams as $param) { - if (GETPOST($param)!='') { - $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); - } +foreach ($listofparams as $param) +{ + if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); } $special_report = false; @@ -132,69 +128,42 @@ $fsearch.=' '; $fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': '; $fsearch.=' '; -// Affiche en-tete du rapport -if ($modetax==1) { // Calculate on invoice for goods and services - $name=$langs->trans("VATReportByCustomersInDueDebtMode"); - $calcmode=$langs->trans("CalcModeVATDebt"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - //$name.='
('.$langs->trans("SeeVATReportInInputOutputMode",'','').')'; - $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); - //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATDueServices"); - $description.='
'; - $description.=$langs->trans("RulesVATDueProducts"); - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $description.='
'.$langs->trans("DepositsAreNotIncluded"); - } else { - $description.='
'.$langs->trans("DepositsAreIncluded"); - } - $description.=$fsearch; - $description.='
' - . ' ' - . $langs->trans('SimpleReport') - . '' - . '
' - . ' ' - . $langs->trans('AddExtraReport') - . '' - . '
'; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); - - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("Description"); - $amountcust=$langs->trans("AmountHT"); - if ($mysoc->tva_assuj) { - $vatcust.=' ('.$langs->trans("ToPay").')'; - } - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("Description"); - $amountsup=$langs->trans("AmountHT"); - if ($mysoc->tva_assuj) { - $vatsup.=' ('.$langs->trans("ToGetBack").')'; - } +// Show report header +$name=$langs->trans("VATReportByThirdParties"); +$calcmode=''; +if ($modetax == 0) $calcmode=$langs->trans('OptionVATDefault'); +if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); +if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); +$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; +// Set period +$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); +$prevyear=$year_start; $prevquarter=$q; +if ($prevquarter > 1) { + $prevquarter--; +} else { + $prevquarter=4; $prevyear--; } -if ($modetax==0) { // Invoice for goods, payment for services - $name=$langs->trans("VATReportByCustomersInInputOutputMode"); - $calcmode=$langs->trans("CalcModeVATEngagement"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - //$name.='
('.$langs->trans("SeeVATReportInDueDebtMode",'','').')'; - $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); - //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATInServices"); - $description.=' '.$langs->trans("DepositsAreIncluded"); - $description.='
'; - $description.=$langs->trans("RulesVATInProducts"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $description .= ' ' . $langs->trans("DepositsAreNotIncluded"); - } else { - $description .= ' ' . $langs->trans("DepositsAreIncluded"); - } - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - $description.=$fsearch; +$nextyear=$year_start; $nextquarter=$q; +if ($nextquarter < 4) { + $nextquarter++; +} else { + $nextquarter=1; $nextyear++; +} +$builddate=dol_now(); + +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.='
'.$langs->trans("DepositsAreNotIncluded"); +} +if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +//$periodlink=($year_start?"".img_previous()." ".img_next()."":""); +$description.=$fsearch; +if (! empty($conf->global->TAX_REPORT_EXTRA_REPORT)) +{ $description.='
' . ' ' . $langs->trans('SimpleReport') @@ -204,21 +173,20 @@ if ($modetax==0) { // Invoice for goods, payment for services . $langs->trans('AddExtraReport') . '' . '
'; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); +} - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("Description"); - $amountcust=$langs->trans("AmountHT"); - if ($mysoc->tva_assuj) { - $vatcust.=' ('.$langs->trans("ToPay").')'; - } - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("Description"); - $amountsup=$langs->trans("AmountHT"); - if ($mysoc->tva_assuj) { - $vatsup.=' ('.$langs->trans("ToGetBack").')'; - } +$elementcust=$langs->trans("CustomersInvoices"); +$productcust=$langs->trans("Description"); +$namerate=$langs->trans("VATRate"); +$amountcust=$langs->trans("AmountHT"); +if ($mysoc->tva_assuj) { + $vatcust.=' ('.$langs->trans("ToPay").')'; +} +$elementsup=$langs->trans("SuppliersInvoices"); +$productsup=$langs->trans("Description"); +$amountsup=$langs->trans("AmountHT"); +if ($mysoc->tva_assuj) { + $vatsup.=' ('.$langs->trans("ToGetBack").')'; } report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); @@ -228,152 +196,547 @@ $vatsup=$langs->trans("VATPaid"); // VAT Received -//print "
"; -//print load_fiche_titre($vatcust); - print "
'.$langs->trans("Label").''.$object->label.'
'.$langs->trans("Label").''.$object->label.'
'.$langs->trans("DatePayment").''; + print ''.$langs->trans("DatePayment").''; print dol_print_date($object->datep,'day'); print '
'; - print $form->editfieldkey("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); + print $form->editfieldkey($form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")), 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); print ''; - print $form->editfieldval("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); + print $form->editfieldval("PeriodEndDate", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); //print dol_print_date($object->datev,'day'); print '
"; -print ""; -print '"; -print '"; -print ""; -print ""; -print ""; -print "\n"; -$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell'); +$y = $year_current; +$total = 0; +$i=0; +$columns = 5; -$action = "tvaclient"; -$object = &$coll_list; -$parameters["mode"] = $modetax; -$parameters["start"] = $date_start; -$parameters["end"] = $date_end; -$parameters["direction"] = 'sell'; -$parameters["type"] = 'vat'; +// Load arrays of datas +$x_coll = tax_by_thirdparty('vat', $db, 0, $date_start, $date_end, $modetax, 'sell'); +$x_paye = tax_by_thirdparty('vat', $db, 0, $date_start, $date_end, $modetax, 'buy'); -// Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('externalbalance')); -$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks - -if (is_array($coll_list)) { - $var=true; - $total = 0; $totalamount = 0; - $i = 1; - foreach ($coll_list as $coll) { - if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - - $intra = str_replace($find,$replace,$coll->tva_intra); - if(empty($intra)) { - if($coll->assuj == '1') { - $intra = $langs->trans('Unknown'); - } else { - //$intra = $langs->trans('NotRegistered'); - $intra = ''; - } - } - print ''; - print '"; - $company_static->id=$coll->socid; - $company_static->name=$coll->name; - $company_static->client=1; - print ''; - $find = array(' ','.'); - $replace = array('',''); - print '"; - print ""; - print ""; - $totalamount = $totalamount + $coll->amount; - $total = $total + $coll->tva; - print "\n"; - $i++; - } - } - $x_coll_sum = $total; - - print ''; - print ''; - print ''; - print ''; -} else { +if (! is_array($x_coll) || ! is_array($x_paye)) +{ $langs->load("errors"); - if ($coll_list == -1) { - if ($modecompta == 'CREANCES-DETTES') - { - print ''; - } - else - { - print ''; - } - } else if ($coll_list == -2) { - print ''; + if ($x_coll == -1) { + print ''; + } else if ($x_coll == -2) { + print ''; } else { - print ''; + print ''; } -} - -//print '
'.$langs->trans("Num")."'.$langs->trans("Customer")."".$langs->trans("VATIntra")."".$langs->trans("AmountHTVATRealReceived")."".$vatcust."
'.$i."'.$company_static->getNomUrl(1,'customer').''.$intra."".price($coll->amount)."".price($coll->tva)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).'
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
' . $langs->trans("Error") . '
'; - - -// VAT Paid - -//print "
"; -//print load_fiche_titre($vatsup); - -//print ""; -print ""; -print '"; -print '"; -print ""; -print ""; -print ""; -print "\n"; - -$company_static=new Societe($db); - -$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy'); - -$parameters["direction"] = 'buy'; -$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks -if (is_array($coll_list)) { - $var=true; - $total = 0; $totalamount = 0; - $i = 1; - foreach ($coll_list as $coll) { - if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - - $intra = str_replace($find,$replace,$coll->tva_intra); - if (empty($intra)) { - if ($coll->assuj == '1') { - $intra = $langs->trans('Unknown'); - } else { - //$intra = $langs->trans('NotRegistered'); - $intra = ''; - } - } - print ''; - print '"; - $company_static->id=$coll->socid; - $company_static->name=$coll->name; - $company_static->fournisseur=1; - print ''; - $find = array(' ','.'); - $replace = array('',''); - print '"; - print ""; - print ""; - $totalamount = $totalamount + $coll->amount; - $total = $total + $coll->tva; - print "\n"; - $i++; +} else { + $x_both = array(); + //now, from these two arrays, get another array with one rate per line + foreach(array_keys($x_coll) as $my_coll_thirdpartyid) + { + $x_both[$my_coll_thirdpartyid]['coll']['totalht'] = $x_coll[$my_coll_thirdpartyid]['totalht']; + $x_both[$my_coll_thirdpartyid]['coll']['vat'] = $x_coll[$my_coll_thirdpartyid]['vat']; + $x_both[$my_coll_thirdpartyid]['paye']['totalht'] = 0; + $x_both[$my_coll_thirdpartyid]['paye']['vat'] = 0; + $x_both[$my_coll_thirdpartyid]['coll']['links'] = ''; + $x_both[$my_coll_thirdpartyid]['coll']['detail'] = array(); + foreach($x_coll[$my_coll_thirdpartyid]['facid'] as $id=>$dummy) { + $invoice_customer->id=$x_coll[$my_coll_thirdpartyid]['facid'][$id]; + $invoice_customer->ref=$x_coll[$my_coll_thirdpartyid]['facnum'][$id]; + $invoice_customer->type=$x_coll[$my_coll_thirdpartyid]['type'][$id]; + $company_static->fetch($x_coll[$my_coll_thirdpartyid]['company_id'][$id]); + $x_both[$my_coll_thirdpartyid]['coll']['detail'][] = array( + 'id' =>$x_coll[$my_coll_thirdpartyid]['facid'][$id], + 'descr' =>$x_coll[$my_coll_thirdpartyid]['descr'][$id], + 'pid' =>$x_coll[$my_coll_thirdpartyid]['pid'][$id], + 'pref' =>$x_coll[$my_coll_thirdpartyid]['pref'][$id], + 'ptype' =>$x_coll[$my_coll_thirdpartyid]['ptype'][$id], + 'payment_id'=>$x_coll[$my_coll_thirdpartyid]['payment_id'][$id], + 'payment_amount'=>$x_coll[$my_coll_thirdpartyid]['payment_amount'][$id], + 'ftotal_ttc'=>$x_coll[$my_coll_thirdpartyid]['ftotal_ttc'][$id], + 'dtotal_ttc'=>$x_coll[$my_coll_thirdpartyid]['dtotal_ttc'][$id], + 'dtype' =>$x_coll[$my_coll_thirdpartyid]['dtype'][$id], + 'drate' =>$x_coll[$my_coll_thirdpartyid]['drate'][$id], + 'datef' =>$x_coll[$my_coll_thirdpartyid]['datef'][$id], + 'datep' =>$x_coll[$my_coll_thirdpartyid]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_coll[$my_coll_thirdpartyid]['ddate_start'][$id], + 'ddate_end' =>$x_coll[$my_coll_thirdpartyid]['ddate_end'][$id], + 'totalht' =>$x_coll[$my_coll_thirdpartyid]['totalht_list'][$id], + 'vat' =>$x_coll[$my_coll_thirdpartyid]['vat_list'][$id], + 'link' =>$invoice_customer->getNomUrl(1,'',12) + ); } } - $x_paye_sum = $total; + // tva paid + foreach (array_keys($x_paye) as $my_paye_thirdpartyid) { + $x_both[$my_paye_thirdpartyid]['paye']['totalht'] = $x_paye[$my_paye_thirdpartyid]['totalht']; + $x_both[$my_paye_thirdpartyid]['paye']['vat'] = $x_paye[$my_paye_thirdpartyid]['vat']; + if (!isset($x_both[$my_paye_thirdpartyid]['coll']['totalht'])) { + $x_both[$my_paye_thirdpartyid]['coll']['totalht'] = 0; + $x_both[$my_paye_thirdpartyid]['coll']['vat'] = 0; + } + $x_both[$my_paye_thirdpartyid]['paye']['links'] = ''; + $x_both[$my_paye_thirdpartyid]['paye']['detail'] = array(); - print ''; - print ''; - print ''; + foreach ($x_paye[$my_paye_thirdpartyid]['facid'] as $id=>$dummy) + { + // ExpenseReport + if ($x_paye[$my_paye_thirdpartyid]['ptype'][$id] == 'ExpenseReportPayment') + { + $expensereport->id=$x_paye[$my_paye_thirdpartyid]['facid'][$id]; + $expensereport->ref=$x_paye[$my_paye_thirdpartyid]['facnum'][$id]; + $expensereport->type=$x_paye[$my_paye_thirdpartyid]['type'][$id]; + + $x_both[$my_paye_thirdpartyid]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_thirdpartyid]['facid'][$id], + 'descr' =>$x_paye[$my_paye_thirdpartyid]['descr'][$id], + 'pid' =>$x_paye[$my_paye_thirdpartyid]['pid'][$id], + 'pref' =>$x_paye[$my_paye_thirdpartyid]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_thirdpartyid]['ptype'][$id], + 'payment_id' =>$x_paye[$my_paye_thirdpartyid]['payment_id'][$id], + 'payment_amount' =>$x_paye[$my_paye_thirdpartyid]['payment_amount'][$id], + 'ftotal_ttc' =>price2num($x_paye[$my_paye_thirdpartyid]['ftotal_ttc'][$id]), + 'dtotal_ttc' =>price2num($x_paye[$my_paye_thirdpartyid]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_thirdpartyid]['dtype'][$id], + 'drate' =>$x_paye[$my_coll_thirdpartyid]['drate'][$id], + 'ddate_start' =>$x_paye[$my_paye_thirdpartyid]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_thirdpartyid]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_thirdpartyid]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_thirdpartyid]['vat_list'][$id], + 'link' =>$expensereport->getNomUrl(1) + ); + } + else + { + $invoice_supplier->id=$x_paye[$my_paye_thirdpartyid]['facid'][$id]; + $invoice_supplier->ref=$x_paye[$my_paye_thirdpartyid]['facnum'][$id]; + $invoice_supplier->type=$x_paye[$my_paye_thirdpartyid]['type'][$id]; + $company_static->fetch($x_paye[$my_paye_thirdpartyid]['company_id'][$id]); + $x_both[$my_paye_thirdpartyid]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_thirdpartyid]['facid'][$id], + 'descr' =>$x_paye[$my_paye_thirdpartyid]['descr'][$id], + 'pid' =>$x_paye[$my_paye_thirdpartyid]['pid'][$id], + 'pref' =>$x_paye[$my_paye_thirdpartyid]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_thirdpartyid]['ptype'][$id], + 'payment_id'=>$x_paye[$my_paye_thirdpartyid]['payment_id'][$id], + 'payment_amount'=>$x_paye[$my_paye_thirdpartyid]['payment_amount'][$id], + 'ftotal_ttc'=>price2num($x_paye[$my_paye_thirdpartyid]['ftotal_ttc'][$id]), + 'dtotal_ttc'=>price2num($x_paye[$my_paye_thirdpartyid]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_thirdpartyid]['dtype'][$id], + 'drate' =>$x_paye[$my_coll_thirdpartyid]['drate'][$id], + 'datef' =>$x_paye[$my_paye_thirdpartyid]['datef'][$id], + 'datep' =>$x_paye[$my_paye_thirdpartyid]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_paye[$my_paye_thirdpartyid]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_thirdpartyid]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_thirdpartyid]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_thirdpartyid]['vat_list'][$id], + 'link' =>$invoice_supplier->getNomUrl(1,'',12) + ); + } + } + } + //now we have an array (x_both) indexed by rates for coll and paye + + + //print table headers for this quadri - incomes first + + $x_coll_sum = 0; + $x_coll_ht = 0; + $x_paye_sum = 0; + $x_paye_ht = 0; + + $span=$columns; + if ($modetax != 1) $span+=2; + + //print ''; + + // Customers invoices + print ''; + print ''; + print ''; + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; + else print ''; + print ''; + print ''; + if ($modetax != 1) + { + print ''; + print ''; + } + print ''; + print ''; print ''; + $action = "tvadetail"; + $parameters["mode"] = $modetax; + $parameters["start"] = $date_start; + $parameters["end"] = $date_end; + $parameters["type"] = 'vat'; + + $object = array(&$x_coll, &$x_paye, &$x_both); + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array + $hookmanager->initHooks(array('externalbalance')); + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + + foreach (array_keys($x_coll) as $thirdparty_id) { + $subtot_coll_total_ht = 0; + $subtot_coll_vat = 0; + + if (is_array($x_both[$thirdparty_id]['coll']['detail'])) + { + + // VAT Rate + print ""; + print ''; + print ''."\n"; + + foreach ($x_both[$thirdparty_id]['coll']['detail'] as $index => $fields) { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + + print ''; + + // Ref + print ''; + + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; + else print ''; + + // Rate + print ''; + + // Description + print ''; + + // Total HT + if ($modetax != 1) + { + print ''; + } + + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + print ''; + } + + // Total collected + print ''; + + // VAT + print ''; + print ''; + + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; + } + } + // Total customers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; + } + + if (count($x_coll) == 0) // Show a total ine if nothing shown + { + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; + } + + // Blank line + print ''; + + // Print table headers for this quadri - expenses now + print ''; + print ''; + print ''; + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; + else print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''."\n"; + + foreach (array_keys($x_paye) as $thirdparty_id) + { + $subtot_paye_total_ht = 0; + $subtot_paye_vat = 0; + + if (is_array($x_both[$thirdparty_id]['paye']['detail'])) + { + print ""; + print ''; + print ''."\n"; + + foreach ($x_both[$thirdparty_id]['paye']['detail'] as $index=>$fields) { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + + print ''; + + // Ref + print ''; + + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; + else print ''; + + // Company name + print ''; + + // Description + print ''; + + // Total HT + if ($modetax != 1) + { + print ''; + } + + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + print ''; + } + + // VAT paid + print ''; + + // VAT + print ''; + print ''; + + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; + } + } + // Total suppliers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; + } + + if (count($x_paye) == 0) { // Show a total line if nothing shown + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; + } + print '
'.$langs->trans("Num")."'.$langs->trans("Supplier")."".$langs->trans("VATIntra")."".$langs->trans("AmountHTVATRealPaid")."".$vatsup."
'.$i."'.$company_static->getNomUrl(1,'supplier').''.$intra."".price($coll->amount)."".price($coll->tva)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).'
'..')
'.$elementcust.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$namerate.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("AmountHTVATRealReceived").''.$vatcust.'
'; + if (is_numeric($thirdparty_id)) + { + $company_static->fetch($thirdparty_id); + print $langs->trans("ThirdParty").': '.$company_static->getNomUrl(1); + } + else + { + $tmpid = preg_replace('/userid_/','',$thirdparty_id); + $user_static->fetch($tmpid); + print $langs->trans("User").': '.$user_static->getNomUrl(1); + } + print '
'.$fields['link'].'' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . '' . $fields['drate'] . ''; + if ($fields['pid']) + { + $product_static->id=$fields['pid']; + $product_static->ref=$fields['pref']; + $product_static->type=$fields['dtype']; // We force with the type of line to have type how line is registered + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + } + } + else + { + if ($type) { + $text = img_object($langs->trans('Service'),'service'); + } else { + $text = img_object($langs->trans('Product'),'product'); + } + if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) { + if ($reg[1]=='DEPOSIT') { + $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1]=='CREDIT_NOTE') { + $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + } + } + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + + // Show range + print_date_range($fields['ddate_start'],$fields['ddate_end']); + } + print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) + { + //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; + $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); + //print ' ('.round($ratiolineinvoice*100,2).'%)'; + } + print ''; + //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; + if ($fields['payment_amount'] && $fields['ftotal_ttc']) + { + $payment_static->id=$fields['payment_id']; + print $payment_static->getNomUrl(2); + } + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) + { + print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'],'MT')); + if (isset($fields['payment_amount'])) { + print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } + } + print ''; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + print price(price2num($temp_ht,'MT'),1); + print ''; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; + print price(price2num($temp_vat,'MT'),1); + //print price($fields['vat']); + print '
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
 
'.$elementsup.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$namesup.''.$productsup.''.$amountsup.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("AmountHTVATRealPaid").''.$vatsup.'
'; + if (is_numeric($thirdparty_id)) + { + $company_static->fetch($thirdparty_id); + print $langs->trans("ThirdParty").': '.$company_static->getNomUrl(1); + } + else + { + $tmpid = preg_replace('/userid_/','',$thirdparty_id); + $user_static->fetch($tmpid); + print $langs->trans("User").': '.$user_static->getNomUrl(1); + } + print '
'.$fields['link'].'' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . '' . $fields['company_link'] . ''; + if ($fields['pid']) + { + $product_static->id=$fields['pid']; + $product_static->ref=$fields['pref']; + $product_static->type=$fields['dtype']; // We force with the type of line to have type how line is registered + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + } + } + else + { + if ($type) { + $text = img_object($langs->trans('Service'),'service'); + } else { + $text = img_object($langs->trans('Product'),'product'); + } + if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) { + if ($reg[1]=='DEPOSIT') { + $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1]=='CREDIT_NOTE') { + $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + } + } + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + + // Show range + print_date_range($fields['ddate_start'],$fields['ddate_end']); + } + print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) + { + //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; + $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); + //print ' ('.round($ratiolineinvoice*100,2).'%)'; + } + print ''; + if ($fields['payment_amount'] && $fields['ftotal_ttc']) + { + $paymentfourn_static->id=$fields['payment_id']; + print $paymentfourn_static->getNomUrl(2); + } + + if (($type == 0 && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) + { + print $langs->trans("NA"); + } + else + { + if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'],'MT')); + if (isset($fields['payment_amount'])) { + print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } + } + print ''; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + print price(price2num($temp_ht,'MT'),1); + print ''; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; + print price(price2num($temp_vat,'MT'),1); + //print price($fields['vat']); + print '
'.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'; // Total to pay @@ -381,198 +744,15 @@ if (is_array($coll_list)) { print ''; $diff = $x_coll_sum - $x_paye_sum; print ''; - print ''; + print ''; print '\n"; print "\n"; -} else { - $langs->load("errors"); - if ($coll_list == -1) { - if ($modecompta == 'CREANCES-DETTES') - { - print ''; - } - else - { - print ''; - } - } else if ($coll_list == -2) { - print ''; - } else { - print ''; - } + $i++; } print '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'; -if ($special_report) { - // Get country 2-letters code - global $mysoc; - $country_id = $mysoc->country_id; - $country = new Ccountry($db); - $country->fetch($country_id); - - // Print listing of other-country customers as additional report - // This matches tax requirements to list all same-country customers (only) - print '

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

'; - print $langs->trans('BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry'); - $coll_list = vat_by_thirdparty($db, 0, $date_start, $date_end, $modetax, 'sell'); - - print ""; - print ""; - print '"; - print '"; - print ""; - print ""; - print ""; - print "\n"; - - if (is_array($coll_list)) { - $var = true; - $total = 0; - $totalamount = 0; - $i = 1; - foreach ($coll_list as $coll) { - if (substr($coll->tva_intra, 0, 2) == $country->code) { - // Only use different-country VAT codes - continue; - } - if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - $var = !$var; - $intra = str_replace($find, $replace, $coll->tva_intra); - if (empty($intra)) { - if ($coll->assuj == '1') { - $intra = $langs->trans('Unknown'); - } else { - //$intra = $langs->trans('NotRegistered'); - $intra = ''; - } - } - print ""; - print '"; - $company_static->id = $coll->socid; - $company_static->name = $coll->name; - $company_static->client = 1; - print ''; - $find = array(' ', '.'); - $replace = array('', ''); - print '"; - print ""; - print ""; - $totalamount = $totalamount + $coll->amount; - $total = $total + $coll->tva; - print "\n"; - $i++; - } - } - $x_coll_sum = $total; - - print ''; - print ''; - print ''; - print ''; - } else { - $langs->load("errors"); - if ($coll_list == -1) { - if ($modecompta == 'CREANCES-DETTES') - { - print ''; - } - else - { - print ''; - } - } else { - if ($coll_list == -2) { - print ''; - } else { - print ''; - } - } - } - print '
' . $langs->trans("Num") . "' . $langs->trans("Customer") . "" . $langs->trans("VATIntra") . "" . $langs->trans("AmountHTVATRealReceived") . "" . $vatcust . "
' . $i . "' . $company_static->getNomUrl(1, - 'customer') . '' . $intra . "" . price($coll->amount) . "" . price($coll->tva) . "
' . $langs->trans("Total") . ':' . price($totalamount) . '' . price($total) . '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'; - - // Print listing of same-country customers as additional report - // This matches tax requirements to list all same-country customers (only) - print '

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

'; - print $langs->trans('BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry'); - $coll_list = vat_by_thirdparty($db, 0, $date_start, $date_end, $modetax, 'sell'); - - print ""; - print ""; - print '"; - print '"; - print ""; - print ""; - print ""; - print "\n"; - - if (is_array($coll_list)) { - $var = true; - $total = 0; - $totalamount = 0; - $i = 1; - foreach ($coll_list as $coll) { - if (substr($coll->tva_intra, 0, 2) != $country->code) { - // Only use same-country VAT codes - continue; - } - if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - $var = !$var; - $intra = str_replace($find, $replace, $coll->tva_intra); - if (empty($intra)) { - if ($coll->assuj == '1') { - $intra = $langs->trans('Unknown'); - } else { - //$intra = $langs->trans('NotRegistered'); - $intra = ''; - } - } - print ""; - print '"; - $company_static->id = $coll->socid; - $company_static->name = $coll->name; - $company_static->client = 1; - print ''; - $find = array(' ', '.'); - $replace = array('', ''); - print '"; - print ""; - print ""; - $totalamount = $totalamount + $coll->amount; - $total = $total + $coll->tva; - print "\n"; - $i++; - } - } - $x_coll_sum = $total; - - print ''; - print ''; - print ''; - print ''; - } else { - $langs->load("errors"); - if ($coll_list == -1) { - if ($modecompta == 'CREANCES-DETTES') - { - print ''; - } - else - { - print ''; - } - } else { - if ($coll_list == -2) { - print ''; - } else { - print ''; - } - } - } - print '
' . $langs->trans("Num") . "' . $langs->trans("Customer") . "" . $langs->trans("VATIntra") . "" . $langs->trans("AmountHTVATRealReceived") . "" . $vatcust . "
' . $i . "' . $company_static->getNomUrl(1, 'customer') . '' . $intra . "" . price($coll->amount) . "" . price($coll->tva) . "
' . $langs->trans("Total") . ':' . price($totalamount) . '' . price($total) . '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'; -} llxFooter(); diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index 2fb7ba272c8..b83cad80bdd 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -40,10 +40,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("other"); -$langs->load("companies"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'companies', 'compta', 'bills')); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); @@ -84,7 +82,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); - $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('label', GETPOST('lib','alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } @@ -111,23 +109,8 @@ if ($object->id) $morehtmlref='
'; // Label of social contribution - $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
'.$langs->trans('Project') . ' : '; - if (! empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref.=''; - $morehtmlref.=$proj->ref; - $morehtmlref.=''; - } else { - $morehtmlref.=''; - } - } + $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); $morehtmlref.='
'; $linkback = '' . $langs->trans("BackToList") . ''; @@ -151,7 +134,7 @@ if ($object->id) print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
'; print ''; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 89accf57492..7c4912411f6 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014 Ferran Marcet * @@ -25,77 +25,162 @@ * \brief Index page of VAT reports */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; -$langs->load("other"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); +// Date range $year=GETPOST("year","int"); -if ($year == 0) +if (empty($year)) { - $year_current = strftime("%Y",time()); - $year_start = $year_current; + $year_current = strftime("%Y",dol_now()); + $year_start = $year_current; } else { - $year_current = $year; - $year_start = $year; + $year_current = $year; + $year_start = $year; +} +$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear")); +$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear")); +if (empty($date_start) || empty($date_end)) // We define date_start and date_end +{ + $q=GETPOST("q","int"); + if (empty($q)) + { + if (GETPOST("month","int")) { $date_start=dol_get_first_day($year_start,GETPOST("month","int"),false); $date_end=dol_get_last_day($year_start,GETPOST("month","int"),false); } + else + { + $date_start=dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START,false); + $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + } + } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } +// Define modetax (0 or 1) +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products +$modetax = $conf->global->TAX_MODE; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); +if (empty($modetax)) $modetax=0; + // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); -// Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit -$modetax = $conf->global->TAX_MODE; -if (isset($_GET["modetax"])) $modetax=$_GET["modetax"]; - /** * print function * - * @param DoliDB $db Database handler - * @param string $sql SQL Request - * @param string $date Date - * @return void + * @param DoliDB $db Database handler + * @param string $sql SQL Request + * @param string $date Date + * @return void */ -function pt ($db, $sql, $date) +function pt($db, $sql, $date) { global $conf, $bc,$langs; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; $total = 0; print ''; + print ''; - print ''; - print ''; - print ''."\n"; + print ''; + print ''; + print ''; print "\n"; - $var=True; - while ($i < $num) - { + + $totalclaimed = 0; + $totalpaid = 0; + $amountclaimed = 0; + $amountpaid = 0; + $previousmonth = ''; + $previousmode = ''; + $mode = ''; + + while ($i < $num) { $obj = $db->fetch_object($result); + $mode = $obj->mode; - print ''; - print '\n"; - $total = $total + $obj->mm; + //print $obj->dm.' '.$obj->mode.' '.$previousmonth.' '.$previousmode; + if ($obj->mode == 'claimed' && ! empty($previousmode)) + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; - print '\n"; - print "\n"; + $amountclaimed = 0; + $amountpaid = 0; + } + + if ($obj->mode == 'claimed') + { + $amountclaimed = $obj->mm; + $totalclaimed = $totalclaimed + $amountclaimed; + } + if ($obj->mode == 'paid') + { + $amountpaid = $obj->mm; + $totalpaid = $totalpaid + $amountpaid; + } + + if ($obj->mode == 'paid') + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; + $amountclaimed = 0; + $amountpaid = 0; + $previousmode = ''; + $previousmonth = ''; + } + else + { + $previousmode = $obj->mode; + $previousmonth = $obj->dm; + } $i++; } - print '"; + + if ($mode == 'claimed' && ! empty($previousmode)) + { + print ''; + print '\n"; + print '\n"; + print '\n"; + print "\n"; + + $amountclaimed = 0; + $amountpaid = 0; + } + + print ''; + print ''; + print ''; + print ''; + print ""; print "
'.$date.''.$langs->trans("Amount").' '.$date.''.$langs->trans("ClaimedForThisPeriod").''.$langs->trans("PaidDuringThisPeriod").'
'.$obj->dm."
'.$previousmonth."'.price($amountclaimed)."'.price($amountpaid)."
'.price($obj->mm)." 
'.$obj->dm."'.price($amountclaimed)."'.price($amountpaid)."
'.$langs->trans("Total")." :".price($total)." 
'.$previousmonth."'.price($amountclaimed)."'.price($amountpaid)."
'.$langs->trans("Total").''.price($totalclaimed).''.price($totalpaid).'
"; + $db->free($result); } else { @@ -108,19 +193,45 @@ function pt ($db, $sql, $date) * View */ -llxHeader(); - +$form=new Form($db); +$company_static=new Societe($db); $tva = new Tva($db); +$description = ''; -$textprevyear="".img_previous($langs->trans("Previous"), 'class="valignbottom"').""; -$textnextyear=" ".img_next($langs->trans("Next"), 'class="valignbottom"').""; +// Show report header +$name = $langs->trans("ReportByMonth"); +$calcmode=''; +if ($modetax == 0) $calcmode=$langs->trans('OptionVATDefault'); +if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); +if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); +$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + +$description = $langs->trans("VATSummary").'
'; +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.='
'.$langs->trans("DepositsAreNotIncluded"); +} +if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +$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); + +$builddate=dol_now(); + + +llxHeader('', $name); + +//$textprevyear="".img_previous($langs->trans("Previous"), 'class="valignbottom"').""; +//$textnextyear=" ".img_next($langs->trans("Next"), 'class="valignbottom"').""; +//print load_fiche_titre($langs->transcountry("VAT", $mysoc->country_code), $textprevyear." ".$langs->trans("Year")." ".$year_start." ".$textnextyear, 'title_accountancy.png'); + +report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); +//report_header($name,'',$textprevyear.$langs->trans("Year")." ".$year_start.$textnextyear,'',$description,$builddate,$exportlink,array(),$calcmode); -print $conf->dol_optimize_smallscreen; -print load_fiche_titre($langs->transcountry("VAT", $mysoc->country_code), $textprevyear." ".$langs->trans("Year")." ".$year_start." ".$textnextyear, 'title_accountancy.png'); -print $langs->trans("VATReportBuildWithOptionDefinedInModule").'
'; -print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')
'; print '
'; print '
'; @@ -132,24 +243,138 @@ print ''; print ''.$langs->trans("Year")." ".$y.''; print ''.$langs->trans("VATToPay").''; print ''.$langs->trans("VATToCollect").''; -print ''.$langs->trans("TotalToPay").''; +print ''.$langs->trans("Balance").''; print ' '."\n"; print ''."\n"; - -$y = $year_current ; - - -$var=True; +$tmp=dol_getdate($date_start); +$y = $tmp['year']; +$m = $tmp['mon']; +$tmp=dol_getdate($date_end); +$yend = $tmp['year']; +$mend = $tmp['mon']; +//var_dump($m); $total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; -$i=0; -for ($m = 1 ; $m < 13 ; $m++ ) +$i=0; $mcursor=0; +while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop { - $coll_listsell = vat_by_date($db, $y, 0, 0, 0, $modetax, 'sell', $m); - $coll_listbuy = vat_by_date($db, $y, 0, 0, 0, $modetax, 'buy', $m); + //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); + if ($m == 13) $y++; + if ($m > 12) $m -= 12; + $mcursor++; + + $x_coll = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'sell', $m); + $x_paye = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'buy', $m); + + $x_both = array(); + //now, from these two arrays, get another array with one rate per line + foreach(array_keys($x_coll) as $my_coll_rate) + { + $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; + $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['paye']['totalht'] = 0; + $x_both[$my_coll_rate]['paye']['vat'] = 0; + $x_both[$my_coll_rate]['coll']['links'] = ''; + $x_both[$my_coll_rate]['coll']['detail'] = array(); + foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { + //$invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; + //$invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; + //$invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; + //$company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); + $x_both[$my_coll_rate]['coll']['detail'][] = array( + 'id' =>$x_coll[$my_coll_rate]['facid'][$id], + 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], + 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], + 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], + 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], + 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], + 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], + 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], + 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], + 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], + 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], + 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], + 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], + 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], + 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], + //'link' =>$invoice_customer->getNomUrl(1,'',12) + ); + } + } + + // tva paid + foreach (array_keys($x_paye) as $my_paye_rate) { + $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; + $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; + if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { + $x_both[$my_paye_rate]['coll']['totalht'] = 0; + $x_both[$my_paye_rate]['coll']['vat'] = 0; + } + $x_both[$my_paye_rate]['paye']['links'] = ''; + $x_both[$my_paye_rate]['paye']['detail'] = array(); + + foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) + { + // ExpenseReport + if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') + { + //$expensereport->id=$x_paye[$my_paye_rate]['facid'][$id]; + //$expensereport->ref=$x_paye[$my_paye_rate]['facnum'][$id]; + //$expensereport->type=$x_paye[$my_paye_rate]['type'][$id]; + + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + //'link' =>$expensereport->getNomUrl(1) + ); + } + else + { + //$invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; + //$invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; + //$invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; + //$company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], + 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + //'link' =>$invoice_supplier->getNomUrl(1,'',12) + ); + } + } + } + //now we have an array (x_both) indexed by rates for coll and paye $action = "tva"; - $object = array(&$coll_listsell, &$coll_listbuy); + $object = array(&$x_coll, &$x_paye, &$x_both); $parameters["mode"] = $modetax; $parameters["year"] = $y; $parameters["month"] = $m; @@ -159,13 +384,13 @@ for ($m = 1 ; $m < 13 ; $m++ ) $hookmanager->initHooks(array('externalbalance')); $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks - if (! is_array($coll_listbuy) && $coll_listbuy == -1) + if (! is_array($x_coll) && $coll_listbuy == -1) { $langs->load("errors"); print ''.$langs->trans("ErrorNoAccountancyModuleLoaded").''; break; } - if (! is_array($coll_listbuy) && $coll_listbuy == -2) + if (! is_array($x_paye) && $coll_listbuy == -2) { print ''.$langs->trans("FeatureNotYetAvailable").''; break; @@ -173,45 +398,121 @@ for ($m = 1 ; $m < 13 ; $m++ ) print ''; - print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").''; + print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").''; - $x_coll = 0; - foreach($coll_listsell as $vatrate=>$val) + $x_coll_sum = 0; + foreach (array_keys($x_coll) as $rate) { - $x_coll+=$val['vat']; - } - $subtotalcoll = $subtotalcoll + $x_coll; - print "".price($x_coll).""; + $subtot_coll_total_ht = 0; + $subtot_coll_vat = 0; - $x_paye = 0; - foreach($coll_listbuy as $vatrate=>$val) + foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) + { + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) + { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + } + } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; + } + } + print "".price(price2num($x_coll_sum,'MT')).""; + + $x_paye_sum = 0; + foreach (array_keys($x_paye) as $rate) { - $x_paye+=$val['vat']; - } - $subtotalpaye = $subtotalpaye + $x_paye; - print "".price($x_paye).""; + $subtot_paye_total_ht = 0; + $subtot_paye_vat = 0; - $diff = $x_coll - $x_paye; + foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) + { + // Payment + $ratiopaymentinvoice=1; + if ($modetax != 1) + { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) + { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + } + } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; + } + } + print "".price(price2num($x_paye_sum,'MT')).""; + + $subtotalcoll = $subtotalcoll + $x_coll_sum; + $subtotalpaye = $subtotalpaye + $x_paye_sum; + + $diff = $x_coll_sum - $x_paye_sum; $total = $total + $diff; - $subtotal = $subtotal + $diff; + $subtotal = price2num($subtotal + $diff, 'MT'); - print "".price($diff)."\n"; + print "".price(price2num($diff,'MT'))."\n"; print " \n"; print "\n"; - $i++; - if ($i > 2) { + $i++; $m++; + if ($i > 2) + { print ''; print ''.$langs->trans("SubTotal").':'; - print ''.price($subtotalcoll).''; - print ''.price($subtotalpaye).''; - print ''.price($subtotal).''; + print ''.price(price2num($subtotalcoll,'MT')).''; + print ''.price(price2num($subtotalpaye,'MT')).''; + print ''.price(price2num($subtotal,'MT')).''; print ' '; $i = 0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; } } -print ''.$langs->trans("TotalToPay").':'.price($total).''; +print ''.$langs->trans("TotalToPay").':'.price(price2num($total, 'MT')).''; print " \n"; print ''; @@ -221,39 +522,50 @@ print ''; print '
'; -print load_fiche_titre($langs->trans("VATPaid"), '', ''); /* * Payed */ -$sql = "SELECT SUM(amount) as mm, date_format(f.datep,'%Y-%m') as dm"; +print load_fiche_titre($langs->trans("VATPaid"), '', ''); + +$sql=''; + +$sql.= "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm, 'claimed' as mode"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as f"; $sql.= " WHERE f.entity = ".$conf->entity; -$sql.= " AND f.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; -$sql.= " AND f.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; -$sql.= " GROUP BY dm ORDER BY dm ASC"; +$sql.= " AND (f.datev >= '".$db->idate($date_start)."' AND f.datev <= '".$db->idate($date_end)."')"; +$sql.= " GROUP BY dm"; -pt($db, $sql,$langs->trans("Year")." $y"); +$sql.= " UNION "; +$sql.= "SELECT SUM(amount) as mm, date_format(f.datep,'%Y-%m') as dm, 'paid' as mode"; +$sql.= " FROM ".MAIN_DB_PREFIX."tva as f"; +$sql.= " WHERE f.entity = ".$conf->entity; +$sql.= " AND (f.datep >= '".$db->idate($date_start)."' AND f.datep <= '".$db->idate($date_end)."')"; +$sql.= " GROUP BY dm"; -print '
'; +$sql.= " ORDER BY dm ASC, mode ASC"; +//print $sql; +pt($db, $sql, $langs->trans("Month")); if (! empty($conf->global->MAIN_FEATURES_LEVEL)) { - /* + print '
'; + + /* * Recap */ - print load_fiche_titre($langs->trans("VATRecap"), '', ''); // need to add translation + print load_fiche_titre($langs->trans("VATBalance"), '', ''); // need to add translation $sql1 = "SELECT SUM(amount) as mm, date_format(f.datev,'%Y') as dm"; $sql1 .= " FROM " . MAIN_DB_PREFIX . "tva as f"; $sql1 .= " WHERE f.entity = " . $conf->entity; - $sql1 .= " AND f.datev >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; - $sql1 .= " AND f.datev <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; + $sql1 .= " AND f.datev >= '" . $db->idate($date_start) . "'"; + $sql1 .= " AND f.datev <= '" . $db->idate($date_end) . "'"; $sql1 .= " GROUP BY dm ORDER BY dm ASC"; $result = $db->query($sql1); @@ -262,7 +574,7 @@ if (! empty($conf->global->MAIN_FEATURES_LEVEL)) print ''; print ""; - print ''; // need to add translation + print ''; print ''; print "\n"; @@ -273,7 +585,7 @@ if (! empty($conf->global->MAIN_FEATURES_LEVEL)) $restopay = $total - $obj->mm; print ""; - print ''; // need to add translation + print ''; print ''; print "\n"; diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index f6026c8f8ea..4a2308bd0bd 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -26,8 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); @@ -37,10 +37,27 @@ $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); +$object = new Tva($db); + + + +/* + * Actions + */ + +if ($action == 'setlib' && $user->rights->tax->charges->creer) +{ + $object->fetch($id); + $result = $object->setValueFrom('label', GETPOST('lib','alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); + if ($result < 0) + setEventMessages($object->error, $object->errors, 'errors'); +} + /* * View */ + $title=$langs->trans("VAT") . " - " . $langs->trans("Info"); $help_url=''; llxHeader("",$title,$helpurl); @@ -53,7 +70,13 @@ $head = vat_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("VATPayment"), -1, 'payment'); -$linkback = ''.$langs->trans("BackToList").''; +$morehtmlref='
'; +// Label of social contribution +$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); +$morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); +$morehtmlref.='
'; + +$linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/list.php similarity index 88% rename from htdocs/compta/tva/reglement.php rename to htdocs/compta/tva/list.php index 27e314762f8..97932d7b1ba 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2017 Alexandre Spangaro * @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/tva/reglement.php + * \file htdocs/compta/tva/list.php * \ingroup tax * \brief List of VAT payments */ @@ -31,11 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -46,7 +46,7 @@ $search_account = GETPOST('search_account','int'); $month = GETPOST("month","int"); $year = GETPOST("year","int"); -$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -100,7 +100,7 @@ $bankstatic = new Account($db); $sql = "SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.fk_typepayment as type, t.num_payment, t.fk_bank, pst.code as payment_code,"; $sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as t"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst.id AND pst.entity IN (".getEntity('c_paiement').")"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst.id"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE t.entity IN (".getEntity('tax').")"; @@ -148,6 +148,13 @@ if ($result) if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($typeid) $param.='&typeid='.$typeid; + $newcardbutton=''; + if ($user->rights->tax->charges->creer) + { + $newcardbutton=''.$langs->trans('NewVATPayment'); + $newcardbutton.= ''; + $newcardbutton.= ''; + } print ''; if ($optioncss != '') print ''; @@ -157,17 +164,17 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit); + print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit); print '
'; print '
' . $langs->trans("VATDue") . '' . $langs->trans("VATDue") . '' . price(price2num($total, 'MT')) . '
' . $langs->trans("VATRestopay") . '' . $langs->trans("RemainToPay") . '' . price(price2num($restopay, 'MT')) . '
'; print ''; - print ''; - print ''; + print ''; + print ''; print ''; - print ''; @@ -192,7 +199,7 @@ if ($result) print ''; print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"t.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"t.label","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre("DateValue",$_SERVER["PHP_SELF"],"t.datev","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre("PeriodEndDate",$_SERVER["PHP_SELF"],"t.datev","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"t.datep","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre("Type",$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder); if (! empty($conf->banque->enabled)) print_liste_field_titre("Account",$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); @@ -259,7 +266,7 @@ if ($result) $colspan=5; if (! empty($conf->banque->enabled)) $colspan++; print ''; - print ""; + print ''; print ""; print "
'; - print ''; + print ''; + print ''; $syear = $year; $formother->select_year($syear?$syear:-1,'year',1, 20, 5); print '
'.$langs->trans("Total").'".price($total)."'.price($total).' 
"; diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php deleted file mode 100644 index 6d33c358af2..00000000000 --- a/htdocs/compta/tva/quadri.php +++ /dev/null @@ -1,317 +0,0 @@ - - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2006 Yannick Warnier - * Copyright (C) 2005-2009 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/compta/tva/quadri.php - * \ingroup tax - * \brief Trimestrial page - * TODO Deal with recurrent invoices as well - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; - -$year = GETPOST('year', 'int'); -if ($year == 0 ) -{ - $year_current = strftime("%Y",time()); - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; -} - -// Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - - -/** - * Gets VAT to collect for the given month of the given year - * The function gets the VAT in split results, as the VAT declaration asks - * to report the amounts for different VAT rates as different lines. - * This function also accounts recurrent invoices. - * - * @param DoliDB $db Database handler - * @param int $y Year - * @param int $q Year quarter (1-4) - * @return array - */ -function tva_coll($db,$y,$q) -{ - global $conf; - - if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") - { - // if vat paid on due invoices - $sql = "SELECT d.fk_facture as facid, f.facnumber as facnum, d.tva_tx as rate, d.total_ht as totalht, d.total_tva as amount"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql.= ", ".MAIN_DB_PREFIX."facturedet as d" ; - $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - $sql.= " WHERE f.fk_soc = s.rowid"; - $sql.= " AND f.entity = ".$conf->entity; - $sql.= " AND f.fk_statut in (1,2)"; - $sql.= " AND f.rowid = d.fk_facture "; - $sql.= " AND date_format(f.datef,'%Y') = '".$y."'"; - $sql.= " AND (date_format(f.datef,'%m') > ".(($q-1)*3); - $sql.= " AND date_format(f.datef,'%m') <= ".($q*3).")"; - $sql.= " ORDER BY rate, facid"; - - } - else - { - // if vat paid on paiments - } - - $resql = $db->query($sql); - - if ($resql) - { - $list = array(); - $rate = -1; - while($assoc = $db->fetch_array($resql)) - { - if($assoc['rate'] != $rate){ //new rate - $list[$assoc['rate']]['totalht'] = $assoc['totalht']; - $list[$assoc['rate']]['vat'] = $assoc['amount']; - $list[$assoc['rate']]['facid'][] = $assoc['facid']; - $list[$assoc['rate']]['facnum'][] = $assoc['facnum']; - }else{ - $list[$assoc['rate']]['totalht'] += $assoc['totalht']; - $list[$assoc['rate']]['vat'] += $assoc['amount']; - if(!in_array($assoc['facid'],$list[$assoc['rate']]['facid'])){ - $list[$assoc['rate']]['facid'][] = $assoc['facid']; - $list[$assoc['rate']]['facnum'][] = $assoc['facnum']; - } - } - $rate = $assoc['rate']; - } - return $list; - } - else - { - dol_print_error($db); - } -} - - -/** - * Gets VAT to pay for the given month of the given year - * The function gets the VAT in split results, as the VAT declaration asks - * to report the amounts for different VAT rates as different lines - * - * @param DoliDB $db Database handler object - * @param int $y Year - * @param int $q Year quarter (1-4) - * @return array - */ -function tva_paye($db, $y,$q) -{ - global $conf; - - if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") - { - // Si on paye la tva sur les factures dues (non brouillon) - $sql = "SELECT d.fk_facture_fourn as facid, f.ref_supplier as facnum, d.tva_tx as rate, d.total_ht as totalht, d.tva as amount"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; - $sql.= ", ".MAIN_DB_PREFIX."facture_fourn_det as d" ; - $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - $sql.= " WHERE f.fk_soc = s.rowid"; - $sql.= " AND f.entity = ".$conf->entity; - $sql.= " AND f.fk_statut = 1 "; - $sql.= " AND f.rowid = d.fk_facture_fourn "; - $sql.= " AND date_format(f.datef,'%Y') = '".$y."'"; - $sql.= " AND (round(date_format(f.datef,'%m')) > ".(($q-1)*3); - $sql.= " AND round(date_format(f.datef,'%m')) <= ".($q*3).")"; - $sql.= " ORDER BY rate, facid "; - } - else - { - // Si on paye la tva sur les payments - } - - $resql = $db->query($sql); - if ($resql) - { - $list = array(); - $rate = -1; - while($assoc = $db->fetch_array($resql)) - { - if($assoc['rate'] != $rate){ //new rate - $list[$assoc['rate']]['totalht'] = $assoc['totalht']; - $list[$assoc['rate']]['vat'] = $assoc['amount']; - $list[$assoc['rate']]['facid'][] = $assoc['facid']; - $list[$assoc['rate']]['facnum'][] = $assoc['facnum']; - }else{ - $list[$assoc['rate']]['totalht'] += $assoc['totalht']; - $list[$assoc['rate']]['vat'] += $assoc['amount']; - if(!in_array($assoc['facid'],$list[$assoc['rate']]['facid'])){ - $list[$assoc['rate']]['facid'][] = $assoc['facid']; - $list[$assoc['rate']]['facnum'][] = $assoc['facnum']; - } - } - $rate = $assoc['rate']; - } - return $list; - - } - else - { - dol_print_error($db); - } -} - - -/** - * View - */ - -llxHeader(); - -$textprevyear="".img_previous().""; -$textnextyear=" ".img_next().""; - -print load_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); - - -echo ''; -echo ''; - -echo ''; - -print "
'; -print load_fiche_titre($langs->trans("VATSummary")); -echo '
"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; - -if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") -{ - $y = $year_current; - - $total = 0; $subtotal = 0; - $i=0; - $subtot_coll_total = 0; - $subtot_coll_vat = 0; - $subtot_paye_total = 0; - $subtot_paye_vat = 0; - for ($q = 1 ; $q <= 4 ; $q++) { - print ""; - $var=true; - - $x_coll = tva_coll($db, $y, $q); - $x_paye = tva_paye($db, $y, $q); - $x_both = array(); - //now, from these two arrays, get another array with one rate per line - foreach(array_keys($x_coll) as $my_coll_rate){ - $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; - $x_both[$my_coll_rate]['paye']['totalht'] = 0; - $x_both[$my_coll_rate]['paye']['vat'] = 0; - $x_both[$my_coll_rate]['coll']['links'] = ''; - foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy){ - $x_both[$my_coll_rate]['coll']['links'] .= '..'.substr($x_coll[$my_coll_rate]['facnum'][$id],-2).' '; - } - } - foreach(array_keys($x_paye) as $my_paye_rate){ - $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; - $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; - if(!isset($x_both[$my_paye_rate]['coll']['totalht'])){ - $x_both[$my_paye_rate]['coll']['total_ht'] = 0; - $x_both[$my_paye_rate]['coll']['vat'] = 0; - } - $x_both[$my_paye_rate]['paye']['links'] = ''; - foreach($x_paye[$my_paye_rate]['facid'] as $id=>$dummy){ - $x_both[$my_paye_rate]['paye']['links'] .= '..'.substr($x_paye[$my_paye_rate]['facnum'][$id],-2).' '; - } - } - //now we have an array (x_both) indexed by rates for coll and paye - - $x_coll_sum = 0; - $x_coll_ht = 0; - $x_paye_sum = 0; - $x_paye_ht = 0; - foreach($x_both as $rate => $both){ - - print ''; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - $x_coll_sum += $both['coll']['vat']; - $x_paye_sum += $both['paye']['vat']; - $subtot_coll_total += $both['coll']['totalht']; - $subtot_coll_vat += $both['coll']['vat']; - $subtot_paye_total += $both['paye']['totalht']; - $subtot_paye_vat += $both['paye']['vat']; - } - - $diff = $x_coll_sum - $x_paye_sum; - $total = $total + $diff; - $subtotal = $subtotal + $diff; - - - print ''; - print ''; - print "\n"; - print "\n"; - - $i++; - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - -} -else -{ - print ''; - print ''; -} - -print '
".$langs->trans("Year")." $year_current".$langs->trans("Income")."".$langs->trans("VATToPay")."".$langs->trans("Invoices")."".$langs->trans("Outcome")."".$langs->trans("VATToCollect")."".$langs->trans("Invoices")."".$langs->trans("TotalToPay")."
".$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dol_print_date(dol_mktime(0,0,0,($q*3),1,$y),"%b %Y").")
$rate%".price($both['coll']['totalht'])."".price($both['coll']['vat'])."".$both['coll']['links']."".price($both['paye']['totalht'])."".price($both['paye']['vat'])."".$both['paye']['links']."
".price($diff)."
'.$langs->trans("Total").':'.price($subtot_coll_total).''.price($subtot_coll_vat).''.price($subtot_paye_total).''.price($subtot_paye_vat).''.price($total).''; - print '
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("FeatureIsSupportedInInOutModeOnly").'
'; -echo ''; -echo ''; - -llxFooter(); -$db->close(); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index c622881d273..e2c7cc5d793 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -1,10 +1,9 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2006-2007 Yannick Warnier - * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2016 Alexandre Spangaro +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2006-2007, 2015 Yannick Warnier + * 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 @@ -21,10 +20,9 @@ */ /** - * \file htdocs/compta/tva/quadri_detail.php - * \ingroup tax - * \brief Trimestrial page - detailed version - * TODO Deal with recurrent invoices as well + * \file htdocs/compta/tva/quadri_detail.php + * \ingroup tax + * \brief VAT by rate */ require '../../main.inc.php'; @@ -32,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; @@ -40,12 +39,8 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; -$langs->load("bills"); -$langs->load("compta"); -$langs->load("companies"); -$langs->load("products"); -$langs->load("trips"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); // Date range $year=GETPOST("year","int"); @@ -62,32 +57,34 @@ $date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GE // Quarter if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $q=GETPOST("q"); + $q=GETPOST("q","int"); if (empty($q)) { - if (GETPOST("month")) { $date_start=dol_get_first_day($year_start,GETPOST("month"),false); $date_end=dol_get_last_day($year_start,GETPOST("month"),false); } + if (GETPOST("month","int")) { $date_start=dol_get_first_day($year_start,GETPOST("month","int"),false); $date_end=dol_get_last_day($year_start,GETPOST("month","int"),false); } else { - $month_current = strftime("%m",dol_now()); - if ($month_current >= 10) $q=4; - elseif ($month_current >= 7) $q=3; - elseif ($month_current >= 4) $q=2; - else $q=1; + $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); + if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } - if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } - if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } - if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } - if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + else + { + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } + } } -$min = GETPOST("min"); +$min = price2num(GETPOST("min","alpha")); if (empty($min)) $min = 0; // Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit +// 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = $conf->global->TAX_MODE; -if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"]; +if (GETPOSTISSET("modetax")) $modetax=GETPOST("modetax",'int'); if (empty($modetax)) $modetax=0; // Security check @@ -101,17 +98,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges'); * View */ -$morequerystring=''; -$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); -foreach($listofparams as $param) -{ - if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); -} - -llxHeader('',$langs->trans("VATReport"),'','',0,0,'','',$morequerystring); - $form=new Form($db); - $company_static=new Societe($db); $invoice_customer=new Facture($db); $invoice_supplier=new FactureFournisseur($db); @@ -121,6 +108,16 @@ $payment_static=new Paiement($db); $paymentfourn_static=new PaiementFourn($db); $paymentexpensereport_static=new PaymentExpenseReport($db); +$morequerystring=''; +$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); +foreach ($listofparams as $param) +{ + if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); +} + +llxHeader('',$langs->trans("VATReport"),'','',0,0,'','',$morequerystring); + + //print load_fiche_titre($langs->trans("VAT"),""); //$fsearch.='
'; @@ -130,160 +127,139 @@ $fsearch.=' '; //$fsearch.=' '; -// Affiche en-tete du rapport -if ($modetax==1) // Calculate on invoice for goods and services -{ - $name=$langs->trans("VATReportByQuartersInDueDebtMode"); - $calcmode=$langs->trans("CalcModeVATDebt"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) $prevquarter--; - else { $prevquarter=4; $prevyear--; } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) $nextquarter++; - else { $nextquarter=1; $nextyear++; } - //$periodlink=($prevyear?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATDueServices"); - $description.='
'; - $description.=$langs->trans("RulesVATDueProducts"); - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='
'.$langs->trans("DepositsAreNotIncluded"); - else $description.='
'.$langs->trans("DepositsAreIncluded"); - $description.=$fsearch; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); - - // Customers invoices - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')'; - - // Suppliers invoices - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("ProductOrService"); - $amountsup=$langs->trans("AmountHT"); - $vatsup=$langs->trans("VATPaid"); - if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')'; - +// Show report header +$name=$langs->trans("VATReportByRates"); +$calcmode=''; +if ($modetax == 0) $calcmode=$langs->trans('OptionVATDefault'); +if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); +if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); +$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; +// Set period +$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); +$prevyear=$year_start; $prevquarter=$q; +if ($prevquarter > 1) { + $prevquarter--; +} else { + $prevquarter=4; $prevyear--; } -if ($modetax==0) // Invoice for goods, payment for services -{ - $name=$langs->trans("VATReportByQuartersInInputOutputMode"); - $calcmode=$langs->trans("CalcModeVATEngagement"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) $prevquarter--; - else { $prevquarter=4; $prevyear--; } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) $nextquarter++; - else { $nextquarter=1; $nextyear++; } - //$periodlink=($prevyear?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATInServices"); - $description.=' '.$langs->trans("DepositsAreIncluded"); - $description.='
'; - $description.=$langs->trans("RulesVATInProducts"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded"); - else $description.=' '.$langs->trans("DepositsAreIncluded"); - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - $description.=$fsearch; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); - - // Customers invoices - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')'; - - // Suppliers invoices - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("ProductOrService"); - $amountsup=$langs->trans("AmountHT"); - $vatsup=$langs->trans("VATPaid"); - if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')'; - +$nextyear=$year_start; $nextquarter=$q; +if ($nextquarter < 4) { + $nextquarter++; +} else { + $nextquarter=1; $nextyear++; } +$description.=$fsearch; +$builddate=dol_now(); + +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); +if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description.='
'.$langs->trans("DepositsAreNotIncluded"); +} +if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); + +// Customers invoices +$elementcust=$langs->trans("CustomersInvoices"); +$productcust=$langs->trans("ProductOrService"); +$amountcust=$langs->trans("AmountHT"); +$vatcust=$langs->trans("VATReceived"); +$namecust=$langs->trans("Name"); +if ($mysoc->tva_assuj) { + $vatcust.=' ('.$langs->trans("ToPay").')'; +} + +// Suppliers invoices +$elementsup=$langs->trans("SuppliersInvoices"); +$productsup=$productcust; +$amountsup=$amountcust; +$vatsup=$langs->trans("VATPaid"); +$namesup=$namecust; +if ($mysoc->tva_assuj) { + $vatsup.=' ('.$langs->trans("ToGetBack").')'; +} + + report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); $vatcust=$langs->trans("VATReceived"); $vatsup=$langs->trans("VATPaid"); $vatexpensereport=$langs->trans("VATPaid"); + // VAT Received and paid print ''; $y = $year_current; $total = 0; $i=0; +$columns = 5; // Load arrays of datas -$x_coll = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'sell'); -$x_paye = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'buy'); +$x_coll = tax_by_rate('vat', $db, 0, 0, $date_start, $date_end, $modetax, 'sell'); +$x_paye = tax_by_rate('vat', $db, 0, 0, $date_start, $date_end, $modetax, 'buy'); if (! is_array($x_coll) || ! is_array($x_paye)) { $langs->load("errors"); - if ($x_coll == -1) - print ''; - else if ($x_coll == -2) - print ''; - else - print ''; -} -else -{ + if ($x_coll == -1) { + print ''; + } else if ($x_coll == -2) { + print ''; + } else { + print ''; + } +} else { $x_both = array(); //now, from these two arrays, get another array with one rate per line foreach(array_keys($x_coll) as $my_coll_rate) { $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; $x_both[$my_coll_rate]['paye']['totalht'] = 0; $x_both[$my_coll_rate]['paye']['vat'] = 0; $x_both[$my_coll_rate]['coll']['links'] = ''; $x_both[$my_coll_rate]['coll']['detail'] = array(); - foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) - { + foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { $invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; $invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; $invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; + $company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); $x_both[$my_coll_rate]['coll']['detail'][] = array( - 'id' =>$x_coll[$my_coll_rate]['facid'][$id], - 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], - 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], - 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], - 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], - 'payment_id' =>$x_coll[$my_coll_rate]['payment_id'][$id], - 'payment_amount' =>$x_coll[$my_coll_rate]['payment_amount'][$id], - 'ftotal_ttc' =>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], - 'dtotal_ttc' =>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], - 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], - 'ddate_start' =>$x_coll[$my_coll_rate]['ddate_start'][$id], - 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], - 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], - 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], - 'link' =>$invoice_customer->getNomUrl(1,'',12)); + 'id' =>$x_coll[$my_coll_rate]['facid'][$id], + 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], + 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], + 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], + 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], + 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], + 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], + 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], + 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], + 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], + 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], + 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], + 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], + 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], + 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], + 'link' =>$invoice_customer->getNomUrl(1,'',12) + ); } } // tva paid - foreach(array_keys($x_paye) as $my_paye_rate){ + foreach (array_keys($x_paye) as $my_paye_rate) { $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; - if(!isset($x_both[$my_paye_rate]['coll']['totalht'])){ + if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { $x_both[$my_paye_rate]['coll']['totalht'] = 0; $x_both[$my_paye_rate]['coll']['vat'] = 0; } $x_both[$my_paye_rate]['paye']['links'] = ''; $x_both[$my_paye_rate]['paye']['detail'] = array(); - foreach($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) + foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) { // ExpenseReport if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') @@ -293,21 +269,21 @@ else $expensereport->type=$x_paye[$my_paye_rate]['type'][$id]; $x_both[$my_paye_rate]['paye']['detail'][] = array( - 'id' =>$x_paye[$my_paye_rate]['facid'][$id], - 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], - 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], - 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], - 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], - 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], - 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], - 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), - 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), - 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], - 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], - 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], - 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), - 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - 'link' =>$expensereport->getNomUrl(1) + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + 'link' =>$expensereport->getNomUrl(1) ); } else @@ -315,22 +291,26 @@ else $invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; $invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; $invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; + $company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); $x_both[$my_paye_rate]['paye']['detail'][] = array( - 'id' =>$x_paye[$my_paye_rate]['facid'][$id], - 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], - 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], - 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], - 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], - 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], - 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], - 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), - 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), - 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], - 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], - 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], - 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), - 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - 'link' =>$invoice_supplier->getNomUrl(1,'',12) + 'id' =>$x_paye[$my_paye_rate]['facid'][$id], + 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], + 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], + 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], + 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], + 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], + 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], + 'link' =>$invoice_supplier->getNomUrl(1,'',12) ); } } @@ -345,16 +325,20 @@ else $x_paye_sum = 0; $x_paye_ht = 0; - $span=3; - if ($modetax == 0) $span+=2; + $span=$columns; + if ($modetax != 1) $span+=2; //print ''; // Customers invoices print ''; print ''; + print ''; + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; + else print ''; + print ''; print ''; - if ($modetax == 0) + if ($modetax != 1) { print ''; print ''; @@ -374,27 +358,29 @@ else $hookmanager->initHooks(array('externalbalance')); $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks - foreach(array_keys($x_coll) as $rate) - { + foreach (array_keys($x_coll) as $rate) { $subtot_coll_total_ht = 0; $subtot_coll_vat = 0; if (is_array($x_both[$rate]['coll']['detail'])) { // VAT Rate - $var=true; print ""; - print ''; + print ''; print ''."\n"; - foreach($x_both[$rate]['coll']['detail'] as $index => $fields) - { + foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) { // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); // Try to enhance type detection using date_start and date_end for free lines where type // was not saved. - if (! empty($fields['ddate_start'])) $type=1; - if (! empty($fields['ddate_end'])) $type=1; + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } print ''; @@ -402,27 +388,45 @@ else // Ref print ''; + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; + else print ''; + + // Company name + print ''; + // Description print ''; // Total HT - if ($modetax == 0) + if ($modetax != 1) { print ''; } // Total collected print ''; // VAT print ''; @@ -487,45 +493,45 @@ else $x_coll_sum += $temp_vat; } } - // Total customers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; + // Total customers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; } - if (count($x_coll) == 0) // Show a total ine if nothing shown - { - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } + if (count($x_coll) == 0) // Show a total line if nothing shown + { + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; + } - // Blank line + // Blank line print ''; - //print table headers for this quadri - expenses now - //imprime les en-tete de tables pour ce quadri - maintenant les d�penses + // Print table headers for this quadri - expenses now print ''; print ''; + print ''; + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; + else print ''; + print ''; print ''; - if ($modetax == 0) - { + if ($modetax != 1) { print ''; print ''; } @@ -533,25 +539,29 @@ else print ''; print ''."\n"; - foreach(array_keys($x_paye) as $rate) + foreach (array_keys($x_paye) as $rate) { $subtot_paye_total_ht = 0; $subtot_paye_vat = 0; - if(is_array($x_both[$rate]['paye']['detail'])) + if (is_array($x_both[$rate]['paye']['detail'])) { - $var=true; print ""; - print ''; + print ''; print ''."\n"; - foreach($x_both[$rate]['paye']['detail'] as $index=>$fields) - { + + foreach ($x_both[$rate]['paye']['detail'] as $index=>$fields) { // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type=(isset($fields['dtype'])?$fields['dtype']:$fields['ptype']); // Try to enhance type detection using date_start and date_end for free lines where type // was not saved. - if (! empty($fields['ddate_start'])) $type=1; - if (! empty($fields['ddate_end'])) $type=1; + if (!empty($fields['ddate_start'])) { + $type=1; + } + if (!empty($fields['ddate_end'])) { + $type=1; + } print ''; @@ -559,21 +569,45 @@ else // Ref print ''; + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; + else print ''; + + // Company name + print ''; + // Description print ''; // Total HT - if ($modetax == 0) + if ($modetax != 1) { print ''; } // VAT paid print ''; // VAT print ''; print ''; $subtot_paye_total_ht += $temp_ht; - $subtot_paye_vat += $temp_vat; - $x_paye_sum += $temp_vat; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; } } - // Total suppliers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; + // Total suppliers for this vat rate + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; } - if (count($x_paye) == 0) // Show a total line if nothing shown - { - print ''; - print ''; - print ''; - if ($modetax == 0) - { - print ''; - print ''; - } - print ''; - print ''; - print ''; + if (count($x_paye) == 0) { // Show a total line if nothing shown + print ''; + print ''; + print ''; + if ($modetax != 1) { + print ''; + print ''; + } + print ''; + print ''; + print ''; } - print '
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'..')
'.$elementcust.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$namecust.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')
'.$langs->trans("Rate").': '.vatrate($rate).'%'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].'' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . '' . $fields['company_link'] . ''; if ($fields['pid']) { $product_static->id=$fields['pid']; $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; + $product_static->type=$fields['dtype']; // We force with the type of line to have type how line is registered print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + } } else { - if ($type) $text = img_object($langs->trans('Service'),'service'); - else $text = img_object($langs->trans('Product'),'product'); - if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) - { - if ($reg[1]=='DEPOSIT') $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); - elseif ($reg[1]=='CREDIT_NOTE') $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); - else $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + if ($type) { + $text = img_object($langs->trans('Service'),'service'); + } else { + $text = img_object($langs->trans('Product'),'product'); } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) { + if ($reg[1]=='DEPOSIT') { + $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1]=='CREDIT_NOTE') { + $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + } + } + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); // Show range print_date_range($fields['ddate_start'],$fields['ddate_end']); @@ -430,7 +434,7 @@ else print ''; print price($fields['totalht']); @@ -445,9 +449,8 @@ else // Payment $ratiopaymentinvoice=1; - if ($modetax == 0) + if ($modetax != 1) { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); print ''; //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; if ($fields['payment_amount'] && $fields['ftotal_ttc']) @@ -455,28 +458,31 @@ else $payment_static->id=$fields['payment_id']; print $payment_static->getNomUrl(2); } - if ($type == 0) + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { - print $langs->trans("NotUsedForGoods"); - } - else { - print price($fields['payment_amount']); - if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'],'MT')); + if (isset($fields['payment_amount'])) { + print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } } print ''; - $temp_ht=$fields['totalht']; - if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT'),1); print ''; - $temp_vat=$fields['vat']; - if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; print price(price2num($temp_vat,'MT'),1); //print price($fields['vat']); print '
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
 '.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
 
'.$elementsup.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$namesup.''.$productsup.''.$amountsup.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$vatsup.'
'.$langs->trans("Rate").': '.vatrate($rate).'%'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].'' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . '' . $fields['company_link'] . ''; if ($fields['pid']) { $product_static->id=$fields['pid']; $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; + $product_static->type=$fields['dtype']; // We force with the type of line to have type how line is registered print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); + } } else { - if ($type) $text = img_object($langs->trans('Service'),'service'); - else $text = img_object($langs->trans('Product'),'product'); - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); + if ($type) { + $text = img_object($langs->trans('Service'),'service'); + } else { + $text = img_object($langs->trans('Product'),'product'); + } + if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) { + if ($reg[1]=='DEPOSIT') { + $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1]=='CREDIT_NOTE') { + $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); + } + } + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),24); // Show range print_date_range($fields['ddate_start'],$fields['ddate_end']); @@ -581,7 +615,7 @@ else print ''; print price($fields['totalht']); @@ -596,83 +630,84 @@ else // Payment $ratiopaymentinvoice=1; - if ($modetax == 0) + if ($modetax != 1) { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); print ''; if ($fields['payment_amount'] && $fields['ftotal_ttc']) { $paymentfourn_static->id=$fields['payment_id']; print $paymentfourn_static->getNomUrl(2); } - if ($type == 0) + + if (($type == 0 && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { - print $langs->trans("NotUsedForGoods"); + print $langs->trans("NA"); } else { - print price($fields['payment_amount']); - if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'],'MT')); + if (isset($fields['payment_amount'])) { + print ' ('.round($ratiopaymentinvoice*100,2).'%)'; + } } print ''; - $temp_ht=$fields['totalht']; - if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT'),1); print ''; - $temp_vat=$fields['vat']; - if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; print price(price2num($temp_vat,'MT'),1); //print price($fields['vat']); print '
 '.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
 '.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'; + print ''; // Total to pay - print '

'; - print ''; - $diff = $x_coll_sum - $x_paye_sum; + print '

'; + print '
'; + $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; print '\n"; @@ -680,7 +715,7 @@ else $i++; } -echo '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
'; +print ''; llxFooter(); $db->close(); diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php deleted file mode 100644 index 4c054923837..00000000000 --- a/htdocs/compta/tva/quarter_report.php +++ /dev/null @@ -1,713 +0,0 @@ - - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2006-2007, 2015 Yannick Warnier - * 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 . - */ - -/** - * \file htdocs/compta/tva/quadri_detail.php - * \ingroup tax - * \brief Trimestrial page - detailed version - * TODO Deal with recurrent invoices as well - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; - -$langs->load("main"); -$langs->load("bills"); -$langs->load("compta"); -$langs->load("companies"); -$langs->load("products"); -$langs->load("other"); - -// Date range -$year=GETPOST('year', 'int'); -if (empty($year)) { - $year_current = strftime("%Y",dol_now()); - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; -} -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); -// Quarter -if (empty($date_start) || empty($date_end)) { // We define date_start and date_end - $q=GETPOST('q', 'int'); - if (empty($q)) { - if (isset($_REQUEST["month"])) { - $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); - $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); - } else { - $month_current = strftime("%m",dol_now()); - if ($month_current >= 10) $q=4; - elseif ($month_current >= 7) $q=3; - elseif ($month_current >= 4) $q=2; - else $q=1; - } - } - if ($q==1) { - $date_start=dol_get_first_day($year_start,1,false); - $date_end=dol_get_last_day($year_start,3,false); - } - if ($q==2) { - $date_start=dol_get_first_day($year_start,4,false); - $date_end=dol_get_last_day($year_start,6,false); - } - if ($q==3) { - $date_start=dol_get_first_day($year_start,7,false); - $date_end=dol_get_last_day($year_start,9,false); - } - if ($q==4) { - $date_start=dol_get_first_day($year_start,10,false); - $date_end=dol_get_last_day($year_start,12,false); - } -} - -$min = GETPOST("min"); -if (empty($min)) { - $min = 0; -} - -// Define modetax (0 or 1) -// 0=normal, 1=option vat for services is on debit -$modetax = $conf->global->TAX_MODE; -if (isset($_REQUEST["modetax"])) { - $modetax=$_REQUEST["modetax"]; -} -if (empty($modetax)) { - $modetax=0; -} - -// Security check -$socid = GETPOST('socid','int'); -if ($user->societe_id) { - $socid=$user->societe_id; -} -$result = restrictedArea($user, 'tax', '', '', 'charges'); - - - -/* - * View - */ - -$morequerystring=''; -$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); -foreach ($listofparams as $param) { - if (GETPOST($param)!='') { - $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); - } -} - -llxHeader('','','','',0,0,'','',$morequerystring); - -$form=new Form($db); - -$company_static=new Societe($db); -$invoice_customer=new Facture($db); -$invoice_supplier=new FactureFournisseur($db); -$product_static=new Product($db); -$payment_static=new Paiement($db); -$paymentfourn_static=new PaiementFourn($db); - -//print load_fiche_titre($langs->trans("VAT"),""); - -//$fsearch.='
'; -$fsearch.=' '; -$fsearch.=' '; -//$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': '; -//$fsearch.=' '; - - -// Affiche en-tete du rapport -if ($modetax==1) { // Calculate on invoice for goods and services - $name=$langs->trans("VATReportByQuartersInDueDebtMode"); - $calcmode=$langs->trans("CalcModeVATDebt"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) { - $prevquarter--; - } else { - $prevquarter=4; $prevyear--; - } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) { - $nextquarter++; - } else { - $nextquarter=1; $nextyear++; - } - //$periodlink=($prevyear?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATDueServices"); - $description.='
'; - $description.=$langs->trans("RulesVATDueProducts"); - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $description.='
'.$langs->trans("DepositsAreNotIncluded"); - } else { - $description.='
'.$langs->trans("DepositsAreIncluded"); - } - $description.=$fsearch; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); - - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - $namecust=$langs->trans("Name"); - if ($mysoc->tva_assuj) { - $vatcust.=' ('.$langs->trans("ToPay").')'; - } - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$langs->trans("ProductOrService"); - $amountsup=$langs->trans("AmountHT"); - $vatsup=$langs->trans("VATPaid"); - $namesup=$namecust; - if ($mysoc->tva_assuj) { - $vatsup.=' ('.$langs->trans("ToGetBack").')'; - } -} -if ($modetax==0) { // Invoice for goods, payment for services - $name=$langs->trans("VATReportByQuartersInInputOutputMode"); - $calcmode=$langs->trans("CalcModeVATEngagement"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $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); - $prevyear=$year_start; $prevquarter=$q; - if ($prevquarter > 1) { - $prevquarter--; - } else { - $prevquarter=4; $prevyear--; - } - $nextyear=$year_start; $nextquarter=$q; - if ($nextquarter < 4) { - $nextquarter++; - } else { - $nextquarter=1; $nextyear++; - } - //$periodlink=($prevyear?"".img_previous()." ".img_next()."":""); - $description=$langs->trans("RulesVATInServices"); - $description.=' '.$langs->trans("DepositsAreIncluded"); - $description.='
'; - $description.=$langs->trans("RulesVATInProducts"); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $description.=' '.$langs->trans("DepositsAreNotIncluded"); - } else { - $description.=' '.$langs->trans("DepositsAreIncluded"); - } - //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); - $description.=$fsearch; - $builddate=dol_now(); - //$exportlink=$langs->trans("NotYetAvailable"); - - $elementcust=$langs->trans("CustomersInvoices"); - $productcust=$langs->trans("ProductOrService"); - $amountcust=$langs->trans("AmountHT"); - $vatcust=$langs->trans("VATReceived"); - $namecust=$langs->trans("Name"); - if ($mysoc->tva_assuj) { - $vatcust.=' ('.$langs->trans("ToPay").')'; - } - $elementsup=$langs->trans("SuppliersInvoices"); - $productsup=$productcust; - $amountsup=$amountcust; - $vatsup=$langs->trans("VATPaid"); - $namesup=$namecust; - if ($mysoc->tva_assuj) { - $vatsup.=' ('.$langs->trans("ToGetBack").')'; - } -} -report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode); - -$vatcust=$langs->trans("VATReceived"); -$vatsup=$langs->trans("VATPaid"); - - -// VAT Received and paid - -print ''; - -$y = $year_current; -$total = 0; -$i=0; -$columns = 6; - -// Load arrays of datas -$x_coll = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'sell'); -$x_paye = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'buy'); - -if (!is_array($x_coll) || !is_array($x_paye)) { - $langs->load("errors"); - if ($x_coll == -1) { - print ''; - } else if ($x_coll == -2) { - print ''; - } else { - print ''; - } -} else { - $x_both = array(); - //now, from these two arrays, get another array with one rate per line - foreach(array_keys($x_coll) as $my_coll_rate) { - $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; - $x_both[$my_coll_rate]['paye']['totalht'] = 0; - $x_both[$my_coll_rate]['paye']['vat'] = 0; - $x_both[$my_coll_rate]['coll']['links'] = ''; - $x_both[$my_coll_rate]['coll']['detail'] = array(); - foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { - $invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; - $invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; - $invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; - $company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); - $x_both[$my_coll_rate]['coll']['detail'][] = array( - 'id' =>$x_coll[$my_coll_rate]['facid'][$id], - 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], - 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], - 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], - 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], - 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], - 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], - 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], - 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], - 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], - 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], - 'company_link'=>$company_static->getNomUrl(1,'',20), - 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], - 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], - 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], - 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], - 'link' =>$invoice_customer->getNomUrl(1,'',12) - ); - } - } - // tva paid - foreach (array_keys($x_paye) as $my_paye_rate) { - $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; - $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; - if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { - $x_both[$my_paye_rate]['coll']['totalht'] = 0; - $x_both[$my_paye_rate]['coll']['vat'] = 0; - } - $x_both[$my_paye_rate]['paye']['links'] = ''; - $x_both[$my_paye_rate]['paye']['detail'] = array(); - - foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) { - $invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; - $invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; - $invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; - $company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); - $x_both[$my_paye_rate]['paye']['detail'][] = array( - 'id' =>$x_paye[$my_paye_rate]['facid'][$id], - 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], - 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], - 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], - 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], - 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], - 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], - 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), - 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), - 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], - 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], - 'company_link'=>$company_static->getNomUrl(1,'',20), - 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], - 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], - 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), - 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - 'link' =>$invoice_supplier->getNomUrl(1,'',12) - ); - } - } - //now we have an array (x_both) indexed by rates for coll and paye - - - //print table headers for this quadri - incomes first - - $x_coll_sum = 0; - $x_coll_ht = 0; - $x_paye_sum = 0; - $x_paye_ht = 0; - - $span=$columns-3; - if ($modetax == 0) $span+=2; - - //print ''; - - // Customers invoices - print ''; - print ''; - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''; - - $action = "tvadetail"; - $parameters["mode"] = $modetax; - $parameters["start"] = $date_start; - $parameters["end"] = $date_end; - $parameters["type"] = 'vat'; - - $object = array(&$x_coll, &$x_paye, &$x_both); - // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array - $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks - - foreach (array_keys($x_coll) as $rate) { - $subtot_coll_total_ht = 0; - $subtot_coll_vat = 0; - - if (is_array($x_both[$rate]['coll']['detail'])) { - // VAT Rate - $var=true; - print ""; - print ''; - print ''."\n"; - - foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) { - // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (!empty($fields['ddate_start'])) { - $type=1; - } - if (!empty($fields['ddate_end'])) { - $type=1; - } - - - print ''; - - // Ref - print ''; - - // Invoice date - print ''; - // Company name - print ''; - - // Description - print ''; - - // Total HT - if ($modetax == 0) { - print ''; - } - - // Payment - $ratiopaymentinvoice=1; - if ($modetax == 0) { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { - $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); - } - print ''; - } - - // Total collected - print ''; - - // VAT - print ''; - print ''; - - $subtot_coll_total_ht += $temp_ht; - $subtot_coll_vat += $temp_vat; - $x_coll_sum += $temp_vat; - } - } - // Total customers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } - - if (count($x_coll) == 0) { // Show a total ine if nothing shown - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } - - // Blank line - print ''; - - // Print table headers for this quadri - expenses now - print ''; - print ''; - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''."\n"; - - foreach (array_keys($x_paye) as $rate) { - $subtot_paye_total_ht = 0; - $subtot_paye_vat = 0; - - if (is_array($x_both[$rate]['paye']['detail'])) { - $var=true; - print ""; - print ''; - print ''."\n"; - - foreach ($x_both[$rate]['paye']['detail'] as $index=>$fields) { - // Define type - $type=($fields['dtype']?$fields['dtype']:$fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (!empty($fields['ddate_start'])) { - $type=1; - } - if (!empty($fields['ddate_end'])) { - $type=1; - } - - - print ''; - - // Ref - print ''; - // Invoice date - print ''; - // Company name - print ''; - - // Description - print ''; - - // Total HT - if ($modetax == 0) { - print ''; - } - - // Payment - $ratiopaymentinvoice=1; - if ($modetax == 0) { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { - $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); - } - print ''; - } - - // VAT paid - print ''; - - // VAT - print ''; - print ''; - - $subtot_paye_total_ht += $temp_ht; - $subtot_paye_vat += $temp_vat; - $x_paye_sum += $temp_vat; - } - } - // Total suppliers for this vat rate - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } - - if (count($x_paye) == 0) { // Show a total line if nothing shown - print ''; - print ''; - print ''; - if ($modetax == 0) { - print ''; - print ''; - } - print ''; - print ''; - print ''; - } - - print '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'..')
'.$elementcust.''.$langs->trans("Date").''.$namecust.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("AmountHTVATRealReceived").''.$vatcust.'
'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].'' . $fields['datef'] . '' . $fields['company_link'] . ''; - if ($fields['pid']) { - $product_static->id=$fields['pid']; - $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) { - print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - } - } else { - if ($type) { - $text = img_object($langs->trans('Service'),'service'); - } else { - $text = img_object($langs->trans('Product'),'product'); - } - if (preg_match('/^\((.*)\)$/',$fields['descr'],$reg)) { - if ($reg[1]=='DEPOSIT') { - $fields['descr']=$langs->transnoentitiesnoconv('Deposit'); - } elseif ($reg[1]=='CREDIT_NOTE') { - $fields['descr']=$langs->transnoentitiesnoconv('CreditNote'); - } else { - $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); - } - } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - - // Show range - print_date_range($fields['ddate_start'],$fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) { - //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; - $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); - //print ' ('.round($ratiolineinvoice*100,2).'%)'; - } - print ''; - //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) { - $payment_static->id=$fields['payment_id']; - print $payment_static->getNomUrl(2); - } - if ($type == 0) { - print $langs->trans("NotUsedForGoods"); - } else { - print $fields['payment_amount']; - if (isset($fields['payment_amount'])) { - print ' ('.round($ratiopaymentinvoice*100,2).'%)'; - } - } - print ''; - $temp_ht=$fields['totalht']; - if ($type == 1) { - $temp_ht=$fields['totalht']*$ratiopaymentinvoice; - } - print price(price2num($temp_ht,'MT'),1); - print ''; - $temp_vat=$fields['vat']; - if ($type == 1) { - $temp_vat=$fields['vat']*$ratiopaymentinvoice; - } - print price(price2num($temp_vat,'MT'),1); - //print price($fields['vat']); - print '
'.$langs->trans("Total").':  '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
 
'.$elementsup.''.$langs->trans("Date").''.$namesup.''.$productsup.''.$amountsup.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("AmountHTVATRealPaid").''.$vatsup.'
'.$langs->trans("Rate").': '.vatrate($rate).'%
'.$fields['link'].'' . $fields['datef'] . '' . $fields['company_link'] . ''; - if ($fields['pid']) { - $product_static->id=$fields['pid']; - $product_static->ref=$fields['pref']; - $product_static->type=$fields['ptype']; - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) { - print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - } - } else { - if ($type) { - $text = img_object($langs->trans('Service'),'service'); - } else { - $text = img_object($langs->trans('Product'),'product'); - } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - - // Show range - print_date_range($fields['ddate_start'],$fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) { - //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; - $ratiolineinvoice=($fields['dtotal_ttc']/$fields['ftotal_ttc']); - //print ' ('.round($ratiolineinvoice*100,2).'%)'; - } - print ''; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) { - $paymentfourn_static->id=$fields['payment_id']; - print $paymentfourn_static->getNomUrl(2); - } - if ($type == 0) { - print $langs->trans("NotUsedForGoods"); - } else { - print $fields['payment_amount']; - if (isset($fields['payment_amount'])) { - print ' ('.round($ratiopaymentinvoice*100,2).'%)'; - } - } - print ''; - $temp_ht=$fields['totalht']; - if ($type == 1) { - $temp_ht=$fields['totalht']*$ratiopaymentinvoice; - } - print price(price2num($temp_ht,'MT'),1); - print ''; - $temp_vat=$fields['vat']; - if ($type == 1) { - $temp_vat=$fields['vat']*$ratiopaymentinvoice; - } - print price(price2num($temp_vat,'MT'),1); - //print price($fields['vat']); - print '
'.$langs->trans("Total").':  '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
'.$langs->trans("Total").':  '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'; - - // Total to pay - print '

'; - print ''; - $diff = $x_coll_sum - $x_paye_sum; - print ''; - print ''; - print '\n"; - print "\n"; - - $i++; -} -print '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
'; - -llxFooter(); -$db->close(); diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index c513db1b49f..183433b02f9 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -44,10 +44,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("other"); -$langs->load("commercial"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'other', 'commercial')); $mesg=''; $error=0; $errors=array(); @@ -101,7 +99,7 @@ if (! $sortfield) $sortfield='a.datep, a.id'; if (! $sortorder) $sortorder='DESC'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('contactcard','globalcard')); +$hookmanager->initHooks(array('contactagenda','globalcard')); /* diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index b5df91ce210..ba96c865d1a 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -43,34 +43,6 @@ abstract class ActionsContactCardCommon var $errors=array(); - /** - * Instantiation of DAO class - * - * @return int 0 - * @deprecated Using getInstanceDao should not be used. - */ - private function getInstanceDao() - { - dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); - - if (! is_object($this->object)) - { - $modelclassfile = dol_buildpath('/'.$this->dirmodule.'/canvas/'.$this->canvas.'/dao_'.$this->targetmodule.'_'.$this->canvas.'.class.php'); - if (file_exists($modelclassfile)) - { - // Include dataservice class (model) - $ret = require_once $modelclassfile; - if ($ret) - { - // Instantiate dataservice class (model) - $modelclassname = 'Dao'.ucfirst($this->targetmodule).ucfirst($this->canvas); - $this->object = new $modelclassname($this->db); - } - } - } - return 0; - } - /** * Get object * @@ -93,141 +65,6 @@ abstract class ActionsContactCardCommon //} } - /** - * 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 - * @return void - */ - function doActions(&$action, $id) - { - global $conf, $user, $langs; - - // Creation utilisateur depuis contact - if ($action == 'confirm_create_user' && GETPOST("confirm") == 'yes') - { - // Recuperation contact actuel - $result = $this->object->fetch($id); - - if ($result > 0) - { - $this->db->begin(); - - // Creation user - $nuser = new User($this->db); - $result=$nuser->create_from_contact($this->object,$_POST["login"]); - - if ($result > 0) - { - $result2=$nuser->setPassword($user,$_POST["password"],0,1,1); - if ($result2) - { - $this->db->commit(); - } - else - { - $this->db->rollback(); - } - } - else - { - $this->errors=$nuser->error; - - $this->db->rollback(); - } - } - else - { - $this->errors=$this->object->errors; - } - } - - // Creation contact - if ($action == 'add') - { - $this->assign_post(); - - if (! $_POST["name"]) - { - array_push($this->errors,$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"))); - $action = 'create'; - } - - if ($_POST["name"]) - { - $id = $this->object->create($user); - if ($id > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - $this->errors=$this->object->errors; - $action = 'create'; - } - } - } - - if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') - { - $result=$this->object->fetch($id); - - $this->object->old_name = $_POST["old_name"]; - $this->object->old_firstname = $_POST["old_firstname"]; - - $result = $this->object->delete(); - if ($result > 0) - { - header("Location: list.php"); - exit; - } - else - { - $this->errors=$this->object->errors; - } - } - - if ($action == 'update') - { - if ($_POST["cancel"]) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); - exit; - } - - if (empty($_POST["name"])) - { - $this->error=array($langs->trans("ErrorFieldRequired",$langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); - $action = 'edit'; - } - - if (empty($this->error)) - { - $this->object->fetch($_POST["contactid"]); - - $this->object->oldcopy = clone $this->object; - - $this->assign_post(); - - $result = $this->object->update($_POST["contactid"], $user); - - if ($result > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); - exit; - } - else - { - $this->errors=$this->object->errors; - $action = 'edit'; - } - } - } - } - /** * Set content of ->tpl array, to use into template * diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7d024e6f096..52957d25343 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -42,10 +42,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("other"); -$langs->load("commercial"); + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'other', 'commercial')); $mesg=''; $error=0; $errors=array(); @@ -176,26 +175,26 @@ if (empty($reshook)) $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); $object->socid = GETPOST("socid",'int'); - $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("firstname"); - $object->civility_id = GETPOST("civility_id",'alpha'); - $object->poste = GETPOST("poste"); - $object->address = GETPOST("address"); - $object->zip = GETPOST("zipcode"); - $object->town = GETPOST("town"); + $object->lastname = GETPOST("lastname",'alpha'); + $object->firstname = GETPOST("firstname",'alpha'); + $object->civility_id = GETPOST("civility_id",'alpha'); + $object->poste = GETPOST("poste",'alpha'); + $object->address = GETPOST("address",'alpha'); + $object->zip = GETPOST("zipcode",'alpha'); + $object->town = GETPOST("town",'alpha'); $object->country_id = GETPOST("country_id",'int'); $object->state_id = GETPOST("state_id",'int'); - $object->skype = GETPOST("skype"); + $object->skype = GETPOST("skype",'alpha'); $object->email = GETPOST("email",'alpha'); - $object->phone_pro = GETPOST("phone_pro"); - $object->phone_perso = GETPOST("phone_perso"); - $object->phone_mobile = GETPOST("phone_mobile"); - $object->fax = GETPOST("fax"); + $object->phone_pro = GETPOST("phone_pro",'alpha'); + $object->phone_perso = GETPOST("phone_perso",'alpha'); + $object->phone_mobile = GETPOST("phone_mobile",'alpha'); + $object->fax = GETPOST("fax",'alpha'); $object->jabberid = GETPOST("jabberid",'alpha'); $object->no_email = GETPOST("no_email",'int'); $object->priv = GETPOST("priv",'int'); - $object->note_public = GETPOST("note_public"); - $object->note_private = GETPOST("note_private"); + $object->note_public = GETPOST("note_public",'none'); + $object->note_private = GETPOST("note_private",'none'); $object->statut = 1; //Defult status to Actif // Note: Correct date should be completed with location to have exact GM time of birth. @@ -340,33 +339,33 @@ if (empty($reshook)) $object->oldcopy = clone $object; - $object->old_lastname = GETPOST("old_lastname"); - $object->old_firstname = GETPOST("old_firstname"); + $object->old_lastname = GETPOST("old_lastname",'alpha'); + $object->old_firstname = GETPOST("old_firstname",'alpha'); $object->socid = GETPOST("socid",'int'); - $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("firstname"); - $object->civility_id = GETPOST("civility_id",'alpha'); - $object->poste = GETPOST("poste"); + $object->lastname = GETPOST("lastname",'alpha'); + $object->firstname = GETPOST("firstname",'alpha'); + $object->civility_id = GETPOST("civility_id",'alpha'); + $object->poste = GETPOST("poste",'alpha'); - $object->address = GETPOST("address"); - $object->zip = GETPOST("zipcode"); - $object->town = GETPOST("town"); - $object->state_id = GETPOST("state_id",'int'); + $object->address = GETPOST("address",'alpha'); + $object->zip = GETPOST("zipcode",'alpha'); + $object->town = GETPOST("town",'alpha'); + $object->state_id = GETPOST("state_id",'int'); $object->fk_departement = GETPOST("state_id",'int'); // For backward compatibility $object->country_id = GETPOST("country_id",'int'); $object->email = GETPOST("email",'alpha'); $object->skype = GETPOST("skype",'alpha'); - $object->phone_pro = GETPOST("phone_pro"); - $object->phone_perso = GETPOST("phone_perso"); - $object->phone_mobile = GETPOST("phone_mobile"); - $object->fax = GETPOST("fax"); + $object->phone_pro = GETPOST("phone_pro",'alpha'); + $object->phone_perso = GETPOST("phone_perso",'alpha'); + $object->phone_mobile = GETPOST("phone_mobile",'alpha'); + $object->fax = GETPOST("fax",'alpha'); $object->jabberid = GETPOST("jabberid",'alpha'); $object->no_email = GETPOST("no_email",'int'); $object->priv = GETPOST("priv",'int'); - $object->note_public = GETPOST("note_public"); - $object->note_private = GETPOST("note_private"); + $object->note_public = GETPOST("note_public",'none'); + $object->note_private = GETPOST("note_private",'none'); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -541,9 +540,9 @@ else // Name print ''; - print 'lastname).'" autofocus="autofocus">'; + print 'lastname).'" autofocus="autofocus">'; print ''; - print 'firstname).'">'; + print 'firstname).'">'; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) @@ -595,8 +594,8 @@ else if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party print ' / '; - print $formcompany->select_ziptown((GETPOST("zipcode")?GETPOST("zipcode"):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; - print $formcompany->select_ziptown((GETPOST("town")?GETPOST("town"):$object->town),'town',array('zipcode','selectcountry_id','state_id')); + print $formcompany->select_ziptown((GETPOST("zipcode",'alpha')?GETPOST("zipcode",'alpha'):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; + print $formcompany->select_ziptown((GETPOST("town",'alpha')?GETPOST("town",'alpha'):$object->town),'town',array('zipcode','selectcountry_id','state_id')); print ''; // Country @@ -644,7 +643,7 @@ else // EMail if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party print ''; - print 'email).'">'; + print 'email).'">'; if (! empty($conf->mailing->enabled)) { print ''; @@ -658,13 +657,13 @@ else // Instant message and no email print ''; - print 'jabberid).'">'; + print 'jabberid).'">'; // Skype if (! empty($conf->skype->enabled)) { print ''; - print 'skype).'">'; + print 'skype).'">'; } // Visibility @@ -686,7 +685,7 @@ else $parameters=array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } @@ -963,7 +962,7 @@ else $parameters=array('colspan' => ' colspan="3"', 'cols'=>3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index eca1174bb59..4724f0d97cd 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -220,15 +220,15 @@ class Contact extends CommonObject $sql.= ", import_key"; $sql.= ") VALUES ("; $sql.= "'".$this->db->idate($now)."',"; - if ($this->socid > 0) $sql.= " ".$this->socid.","; + if ($this->socid > 0) $sql.= " ".$this->db->escape($this->socid).","; else $sql.= "null,"; $sql.= "'".$this->db->escape($this->lastname)."',"; $sql.= "'".$this->db->escape($this->firstname)."',"; - $sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").","; - $sql.= " ".$this->priv.","; - $sql.= " ".$this->statut.","; + $sql.= " ".($user->id > 0 ? "'".$this->db->escape($user->id)."'":"null").","; + $sql.= " ".$this->db->escape($this->priv).","; + $sql.= " ".$this->db->escape($this->statut).","; $sql.= " ".(! empty($this->canvas)?"'".$this->db->escape($this->canvas)."'":"null").","; - $sql.= " ".$entity.","; + $sql.= " ".$this->db->escape($entity).","; $sql.= "'".$this->db->escape($this->ref_ext)."',"; $sql.= " ".(! empty($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null"); $sql.= ")"; @@ -342,6 +342,7 @@ class Contact extends CommonObject $sql .= ", email='".$this->db->escape($this->email)."'"; $sql .= ", skype='".$this->db->escape($this->skype)."'"; $sql .= ", photo='".$this->db->escape($this->photo)."'"; + $sql .= ", birthday=".($this->birthday ? "'".$this->db->idate($this->birthday)."'" : "null"); $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"); @@ -349,7 +350,7 @@ class Contact extends CommonObject $sql .= ", phone_mobile = ".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null"); $sql .= ", jabberid = ".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null"); $sql .= ", priv = '".$this->db->escape($this->priv)."'"; - $sql .= ", statut = ".$this->statut; + $sql .= ", statut = ".$this->db->escape($this->statut); $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'":"NULL"); $sql .= ", default_lang=".($this->default_lang?"'".$this->db->escape($this->default_lang)."'":"NULL"); $sql .= ", no_email=".($this->no_email?"'".$this->db->escape($this->no_email)."'":"0"); @@ -366,11 +367,8 @@ class Contact extends CommonObject $action='update'; - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('contactdao')); - $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)) + // Actions on extra fields + if (! $error) { if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { @@ -381,7 +379,6 @@ class Contact extends CommonObject } } } - else if ($reshook < 0) $error++; if (! $error && $this->user_id > 0) { @@ -530,7 +527,7 @@ class Contact extends CommonObject 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->note_private && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note_private; + if ($this->note_private && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = dol_string_nohtmltag($this->note_private, 2); if ($this->email && ! empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email; if ($conf->global->LDAP_SERVER_TYPE == 'egroupware') @@ -588,8 +585,8 @@ class Contact extends CommonObject $resql = $this->db->query($sql); if (! $resql) { - $error++; - $this->error=$this->db->lasterror(); + $error++; + $this->error=$this->db->lasterror(); } // Mis a jour alerte birthday @@ -690,7 +687,10 @@ class Contact extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.rowid = u.fk_socpeople"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; if ($id) $sql.= " WHERE c.rowid = ". $id; - elseif ($ref_ext) $sql .= " WHERE c.ref_ext = '".$this->db->escape($ref_ext)."'"; + elseif ($ref_ext) { + $sql .= " WHERE c.entity IN (".getEntity($this->element).")"; + $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; + } $resql=$this->db->query($sql); if ($resql) @@ -1050,10 +1050,7 @@ class Contact extends CommonObject $sql.= " WHERE mc.email = '".$this->db->escape($this->email)."'"; $sql.= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes - dol_syslog(get_class($this)."::getNbOfEMailings", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) { $obj = $this->db->fetch_object($resql); @@ -1078,9 +1075,10 @@ class Contact extends CommonObject * @param int $maxlen Max length of * @param string $moreparam Add more param into URL * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1) + function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0) { global $conf, $langs, $hookmanager; @@ -1110,27 +1108,26 @@ class Contact extends CommonObject $url .= $moreparam; - $linkstart = 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label=$langs->trans("ShowContact"); - $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose.= ' class="classfortooltip">'; + if (empty($notooltip)) { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowContact"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.= ' class="classfortooltip"'; - if (! is_object($hookmanager)) - { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($this->db); + /* + $hookmanager->initHooks(array('contactdao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $linkclose = $hookmanager->resPrint; + */ } - $hookmanager->initHooks(array('contactdao')); - $parameters=array('id'=>$this->id); - $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $linkclose = $hookmanager->resPrint; - $linkstart.=$linkclose; + $linkstart = ''; $linkend=''; if ($option == 'xxx') @@ -1139,12 +1136,18 @@ class Contact extends CommonObject $linkend=''; } - $result.=$linkstart; if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1); if ($withpicto != 2) $result.=($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)); $result.=$linkend; + global $action; + $hookmanager->initHooks(array('contactdao')); + $parameters=array('id'=>$this->id, 'getnomurl'=>$result); + $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $result = $hookmanager->resPrint; + else $result .= $hookmanager->resPrint; + return $result; } diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 281924cb589..1a60ddaaccb 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -30,9 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("other"); -$langs->load("companies"); -$langs->load("contact"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'companies', 'contact')); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); @@ -153,7 +152,7 @@ if ($object->id) print ''; print ''.$langs->trans("NbOfAttachedFiles").''.count($filearray).''; - print ''.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").''; + print ''.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).''; print ''; print '
'; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 287c27d8b10..7ddee3f7722 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; +// Load translation files required by the page $langs->load("companies"); diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 02a25d8005c..045cdfcd2c5 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("companies"); -$langs->load("ldap"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'ldap')); $langs->load("admin"); $action=GETPOST('action','aZ09'); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 6e62cef1eb0..7a5503d07ca 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -7,6 +7,8 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 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 @@ -32,6 +34,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +// Load translation files required by the page $langs->loadLangs(array("companies", "suppliers")); $action=GETPOST('action','alpha'); @@ -120,7 +123,8 @@ else if ($type == "o") } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array($contextpage)); +$object = new Contact($db); +$hookmanager->initHooks(array('contactlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -133,6 +137,7 @@ $fieldstosearchall = array( 'p.firstname'=>'Firstname', 'p.email'=>'EMail', 's.nom'=>"ThirdParty", + 'p.phone'=>"Phone", ); // Definition of fields for list @@ -256,7 +261,7 @@ if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_conta if (! empty($search_categ_thirdparty)) $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 (! empty($search_categ_supplier)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs2 ON s.rowid = cs2.fk_soc"; // We need this table joined to the select in order to filter by categ if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; -$sql.= ' WHERE p.entity IN ('.getEntity('societe').')'; +$sql.= ' WHERE p.entity IN ('.getEntity('socpeople').')'; if (!$user->rights->societe->client->voir && !$socid) //restriction { $sql .= " AND (sc.fk_user = " .$user->id." OR p.fk_soc IS NULL)"; @@ -300,6 +305,7 @@ if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $sea if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype); if (strlen($search_email)) $sql.= natural_search('p.email', $search_email); +if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip); if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status); if ($search_import_key) $sql.= natural_search("p.import_key",$search_import_key); if ($type == "o") // filtre sur type @@ -344,6 +350,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit+1, $offset); @@ -409,6 +420,14 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete']=$langs-> if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); +$newcardbutton=''; +if ($user->rights->societe->contact->creer) +{ + $newcardbutton=''.$langs->trans('NewContactAddress').''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} + print ''; if ($optioncss != '') print ''; print ''; @@ -418,7 +437,7 @@ print ''; print ''; print ''; -print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit); +print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies.png', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="contact"; diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 1fa766e0913..731dadb6433 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $action = GETPOST('action','aZ09'); +// Load translation files required by the page $langs->load("companies"); // Security check diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 9e85ef98294..3e5ec085132 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -27,8 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; -$langs->load("companies"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'other')); $id = GETPOST('id','int'); $action = GETPOST('action','alpha'); diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 3fb55acc2ca..b9b0d51c162 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 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 @@ -31,9 +31,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array("companies","admin","contracts")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index e3047466e1b..42a8ed589d7 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -31,9 +31,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'contracts')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index a2d189c9790..d1b53e58495 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2017 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014-2016 Ferran Marcet + * Copyright (C) 2014-2018 Ferran Marcet * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Jean-François Ferry * @@ -46,12 +46,8 @@ if (! empty($conf->projet->enabled)) { } require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -$langs->load("contracts"); -$langs->load("orders"); -$langs->load("companies"); -$langs->load("bills"); -$langs->load("products"); -$langs->load('compta'); +// Load translation files required by the page +$langs->loadLangs(array("contracts","orders","companies","bills","products",'compta')); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); @@ -955,19 +951,35 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } - $result = $object->setValueFrom('ref', GETPOST('ref','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY'); - 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; - } + $old_ref = $object->ref; + + $result = $object->setValueFrom('ref', GETPOST('ref','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'editref'; + } else { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $old_filedir = $conf->contrat->dir_output . '/' . dol_sanitizeFileName($old_ref); + $new_filedir = $conf->contrat->dir_output . '/' . dol_sanitizeFileName($object->ref); + + $files = dol_dir_list($old_filedir); + if (!empty($files)) + { + if (!is_dir($new_filedir)) dol_mkdir($new_filedir); + foreach ($files as $file) + { + dol_move($file['fullname'], $new_filedir.'/'.$file['name']); + } + } + + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); + exit; + } + } + else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); + exit; + } } elseif ($action=='setdate_contrat') { @@ -1271,7 +1283,7 @@ if ($action == 'create') print $hookmanager->resPrint; // Other attributes - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -1538,6 +1550,7 @@ else print ''; // Area with common detail of line + print '
'; print ''; $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.product_type, cd.description, cd.price_ht, cd.qty,"; @@ -1576,7 +1589,7 @@ else if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { - print ''; + print ''; // Label if ($objp->fk_product > 0) { @@ -1640,13 +1653,14 @@ else print ''; + print ''; print ''; } - // Display lines extrafields if (is_array($extralabelslines) && count($extralabelslines)>0) { - print ''; $line = new ContratLigne($db); $line->fetch_optionals($objp->rowid); - print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bcnd[$var], 'colspan'=>$colspan)); - print ''; + print $line->showOptionals($extrafieldsline, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } } // Ligne en mode update else { // Ligne carac - print ""; + print ''; print ''; + print ''; $colspan=6; if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) $colspan++; if($conf->global->PRODUCT_USE_UNITS) $colspan++; // Ligne dates prevues - print ""; + print ''; print ''; + print ''; if (is_array($extralabelslines) && count($extralabelslines)>0) { - print ''; $line = new ContratLigne($db); $line->fetch_optionals($objp->rowid); - print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$colspan)); - print ''; + print $line->showOptionals($extrafieldsline, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } - - print ''; } $db->free($result); @@ -1800,12 +1809,13 @@ else if ($object->statut > 0) { - print ''; + print ''; print ''; print "\n"; } print "
'; if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) { - print ''; + print ''; + print ''; print img_picto($langs->trans("MoveToAnotherContract"),'uparrow'); print ''; } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_edit(); print ''; } @@ -1671,7 +1685,7 @@ else $colspan = 7; } - print '
'; // Date planned @@ -1704,21 +1718,18 @@ else print '
'; if ($objp->fk_product) { @@ -1766,29 +1777,27 @@ else print ''; print '
'; print '
'; print $langs->trans("DateStartPlanned").' '; $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); print '   '.$langs->trans("DateEndPlanned").' '; $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); print '

"; + print '
'; print "\n"; @@ -1877,7 +1887,7 @@ else { print ''; - print ''; + print ''; print ''; print ''; print "\n"; - print ''; + print ''; print ''; + print ''; print ''; @@ -1972,7 +1982,7 @@ else print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).''; if ($user->societe_id == 0) @@ -1904,7 +1914,7 @@ else print '
'; // Si pas encore active @@ -1960,7 +1970,7 @@ else } } - print '
'.$langs->trans("DateServiceActivate").''; print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); print '
'.$langs->trans("Comment").''; print '   '; @@ -2017,7 +2027,7 @@ else $now=dol_now(); if ($dateactend > $now) $dateactend=$now; - print '
'; + print '
'; if ($objp->statut >= 4) { if ($objp->statut == 4) @@ -2030,7 +2040,7 @@ else print ''; print '
'.$langs->trans("Comment").''; print '   '; @@ -2070,8 +2080,6 @@ else // Form to add new line if ($action != 'editline') { - $var = true; - $forcetoshowtitlelines=1; // Add free products/services @@ -2108,9 +2116,9 @@ else // Send if ($object->statut == 1) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { - print ''; + print ''; } else - print ''; + print ''; } if ($object->statut == 0 && $nbofservices) @@ -2124,7 +2132,7 @@ else else print ''; } - if (! empty($conf->facture->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) + if (! empty($conf->facture->enabled) && $object->statut > 0) { $langs->load("bills"); if ($user->rights->facture->creer) print ''; @@ -2143,7 +2151,7 @@ else print ''; } - if ($object->nbofservicesclosed > 0) + if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) { print ''; } @@ -2193,7 +2201,6 @@ else $genallowed = $user->rights->contrat->lire; $delallowed = $user->rights->contrat->creer; - $var = true; print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 689b0465fd4..1bb17eb4352 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -182,7 +182,7 @@ class Contracts extends DolibarrApi * @param array $request_data Request data * @return int ID of contrat */ - function post($request_data = NULL) + function post($request_data = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401, "Insuffisant rights"); @@ -247,7 +247,7 @@ class Contracts extends DolibarrApi * * @return int */ - function postLine($id, $request_data = NULL) { + function postLine($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); } @@ -300,7 +300,7 @@ class Contracts extends DolibarrApi * * @return object */ - function putLine($id, $lineid, $request_data = NULL) { + function putLine($id, $lineid, $request_data = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); } @@ -359,7 +359,7 @@ class Contracts extends DolibarrApi * * @return object */ - function activateLine($id, $lineid, $datestart, $dateend = NULL, $comment = NULL) { + function activateLine($id, $lineid, $datestart, $dateend = null, $comment = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); } @@ -396,7 +396,7 @@ class Contracts extends DolibarrApi * * @return object */ - function unactivateLine($id, $lineid, $datestart, $comment = NULL) { + function unactivateLine($id, $lineid, $datestart, $comment = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); } @@ -470,7 +470,7 @@ class Contracts extends DolibarrApi * * @return int */ - function put($id, $request_data = NULL) { + function put($id, $request_data = null) { if(! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index f1b0c5cdfb9..e32ebaff987 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -237,7 +237,13 @@ class Contrat extends CommonObject */ function active_line($user, $line_id, $date, $date_end='', $comment='') { - return $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); + $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); + if ($result < 0) + { + $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; + $this->errors = $this->lines[$this->lines_id_index_mapper[$line_id]]->errors; + } + return $result; } @@ -252,7 +258,13 @@ class Contrat extends CommonObject */ function close_line($user, $line_id, $date_end, $comment='') { - return $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); + $result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); + if ($result < 0) + { + $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; + $this->errors = $this->lines[$this->lines_id_index_mapper[$line_id]]->errors; + } + return $result; } @@ -264,6 +276,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param string $comment Comment * @return int <0 if KO, >0 if OK + * @see closeAll */ function activateAll($user, $date_start='', $notrigger=0, $comment='') { @@ -279,7 +292,7 @@ class Contrat extends CommonObject foreach($this->lines as $contratline) { // Open lines not already open - if ($contratline->statut != 4) + if ($contratline->statut != ContratLigne::STATUS_OPEN) { $contratline->context = $this->context; @@ -319,6 +332,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param string $comment Comment * @return int <0 if KO, >0 if OK + * @see activateAll */ function closeAll(User $user, $notrigger=0, $comment='') { @@ -334,11 +348,11 @@ class Contrat extends CommonObject foreach($this->lines as $contratline) { // Close lines not already closed - if ($contratline->statut != 5) + if ($contratline->statut != ContratLigne::STATUS_CLOSED) { $contratline->date_cloture=$now; $contratline->fk_user_cloture=$user->id; - $contratline->statut='5'; + $contratline->statut=ContratLigne::STATUS_CLOSED; $result=$contratline->close_line($user, $now, $comment, $notrigger); if ($result < 0) { @@ -675,7 +689,8 @@ class Contrat extends CommonObject } /** - * Load lines array into this->lines + * Load lines array into this->lines. + * This set also nbofserviceswait, nbofservicesopened, nbofservicesexpired and nbofservicesclosed * * @return ContratLigne[] Return array of contract lines */ @@ -764,17 +779,7 @@ class Contrat extends CommonObject $line->fk_user_cloture = $objp->fk_user_cloture; $line->fk_unit = $objp->fk_unit; - $line->ref = $objp->product_ref; // deprecated - if (empty($objp->fk_product)) - { - $line->label = ''; // deprecated - $line->libelle = $objp->description; // deprecated - } - else - { - $line->label = $objp->product_label; // deprecated - $line->libelle = $objp->product_label; // deprecated - } + $line->ref = $objp->product_ref; // deprecated $line->product_ref = $objp->product_ref; // Ref product $line->product_desc = $objp->product_desc; // Description product $line->product_label = $objp->product_label; // Label product @@ -805,10 +810,10 @@ class Contrat extends CommonObject //dol_syslog("1 ".$line->desc); //dol_syslog("2 ".$line->product_desc); - if ($line->statut == 0) $this->nbofserviceswait++; - if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++; - if ($line->statut == 4 && (! empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++; - if ($line->statut == 5) $this->nbofservicesclosed++; + if ($line->statut == ContratLigne::STATUS_INITIAL) $this->nbofserviceswait++; + if ($line->statut == ContratLigne::STATUS_OPEN && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++; + if ($line->statut == ContratLigne::STATUS_OPEN && (! empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++; + if ($line->statut == ContratLigne::STATUS_CLOSED) $this->nbofservicesclosed++; $total_ttc+=$objp->total_ttc; // TODO Not saved into database $total_vat+=$objp->total_tva; @@ -899,17 +904,20 @@ class Contrat extends CommonObject if ($result > 0) { $modCodeContract = new $module(); - } - if (!empty($modCodeContract->code_auto)) { - // Mise a jour ref - $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { - if ($this->id) + if (!empty($modCodeContract->code_auto)) { + // Mise a jour ref + $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; + if ($this->db->query($sql)) { - $this->ref="(PROV".$this->id.")"; + if ($this->id) + { + $this->ref="(PROV".$this->id.")"; + } } + } else { + $error++; + $this->error='Failed to get PROV number'; } } @@ -1279,36 +1287,36 @@ class Contrat extends CommonObject $result=$this->call_trigger('CONTRACT_MODIFY',$user); if ($result < 0) { $error++; } // End call triggers - } - } - - if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used - { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - - // Commit or rollback - if ($error) - { - 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; } } + if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + + // Commit or rollback + if ($error) + { + 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; + } + } + /** * Ajoute une ligne de contrat en base @@ -1336,6 +1344,7 @@ class Contrat extends CommonObject function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null, $rang=0) { global $user, $langs, $conf, $mysoc; + $error=0; dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type, $pu_ttc, $info_bits, $rang"); @@ -1544,6 +1553,8 @@ class Contrat extends CommonObject { global $user, $conf, $langs, $mysoc; + $error=0; + // Clean parameters $qty=trim($qty); $desc=trim($desc); @@ -2450,12 +2461,15 @@ class ContratLigne extends CommonObjectLine var $fk_contrat; var $fk_product; var $statut; // 0 inactive, 4 active, 5 closed - var $type; // 0 for product, 1 for service + var $type; // 0 for product, 1 for service + /** + * @var string + * @deprecated + */ var $label; /** * @var string - * @deprecated Use $label instead - * @see label + * @deprecated */ public $libelle; @@ -2511,6 +2525,11 @@ class ContratLigne extends CommonObjectLine var $fk_user_cloture; var $commentaire; + const STATUS_INITIAL = 0; + const STATUS_OPEN = 4; + const STATUS_CLOSED = 5; + + /** * Constructor @@ -2549,51 +2568,51 @@ class ContratLigne extends CommonObjectLine $langs->load("contracts"); if ($mode == 0) { - if ($statut == 0) { return $langs->trans("ServiceStatusInitial"); } - if ($statut == 4 && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } - if ($statut == 4 && $expired == 0) { return $langs->trans("ServiceStatusNotLate"); } - if ($statut == 4 && $expired == 1) { return $langs->trans("ServiceStatusLate"); } - if ($statut == 5) { return $langs->trans("ServiceStatusClosed"); } + if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial"); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLate"); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLate"); } + if ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed"); } } if ($mode == 1) { - if ($statut == 0) { return $langs->trans("ServiceStatusInitial"); } - if ($statut == 4 && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } - if ($statut == 4 && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort"); } - if ($statut == 4 && $expired == 1) { return $langs->trans("ServiceStatusLateShort"); } - if ($statut == 5) { return $langs->trans("ServiceStatusClosed"); } + if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial"); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort"); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLateShort"); } + if ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed"); } } if ($mode == 2) { - if ($statut == 0) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0').' '.$langs->trans("ServiceStatusInitial"); } - if ($statut == 4 && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4').' '.$langs->trans("ServiceStatusRunning"); } - if ($statut == 4 && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4').' '.$langs->trans("ServiceStatusNotLateShort"); } - if ($statut == 4 && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3').' '.$langs->trans("ServiceStatusLateShort"); } - if ($statut == 5) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6') .' '.$langs->trans("ServiceStatusClosed"); } + if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0').' '.$langs->trans("ServiceStatusInitial"); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4').' '.$langs->trans("ServiceStatusRunning"); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4').' '.$langs->trans("ServiceStatusNotLateShort"); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3').' '.$langs->trans("ServiceStatusLateShort"); } + if ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6') .' '.$langs->trans("ServiceStatusClosed"); } } if ($mode == 3) { - if ($statut == 0) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0',$moreatt); } - if ($statut == 4 && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4',$moreatt); } - if ($statut == 4 && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4',$moreatt); } - if ($statut == 4 && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3',$moreatt); } - if ($statut == 5) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6',$moreatt); } + if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0',$moreatt); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4',$moreatt); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4',$moreatt); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3',$moreatt); } + if ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6',$moreatt); } } if ($mode == 4) { - if ($statut == 0) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0').' '.$langs->trans("ServiceStatusInitial"); } - if ($statut == 4 && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4').' '.$langs->trans("ServiceStatusRunning"); } - if ($statut == 4 && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4').' '.$langs->trans("ServiceStatusNotLate"); } - if ($statut == 4 && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3').' '.$langs->trans("ServiceStatusLate"); } - if ($statut == 5) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6') .' '.$langs->trans("ServiceStatusClosed"); } + if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'),'statut0').' '.$langs->trans("ServiceStatusInitial"); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'),'statut4').' '.$langs->trans("ServiceStatusRunning"); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'),'statut4').' '.$langs->trans("ServiceStatusNotLate"); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'),'statut3').' '.$langs->trans("ServiceStatusLate"); } + if ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'),'statut6') .' '.$langs->trans("ServiceStatusClosed"); } } if ($mode == 5) { - if ($statut == 0) { return $langs->trans("ServiceStatusInitial").' '.img_picto($langs->trans('ServiceStatusInitial'),'statut0'); } - if ($statut == 4 && $expired == -1) { return $langs->trans("ServiceStatusRunning").' '.img_picto($langs->trans('ServiceStatusRunning'),'statut4'); } - if ($statut == 4 && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort").' '.img_picto($langs->trans('ServiceStatusNotLateShort'),'statut4'); } - if ($statut == 4 && $expired == 1) { return $langs->trans("ServiceStatusLateShort").' '.img_picto($langs->trans('ServiceStatusLate'),'statut3'); } - if ($statut == 5) { return $langs->trans("ServiceStatusClosed").' '.img_picto($langs->trans('ServiceStatusClosed'),'statut6'); } + if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial").' '.img_picto($langs->trans('ServiceStatusInitial'),'statut0'); } + if ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning").' '.img_picto($langs->trans('ServiceStatusRunning'),'statut4'); } + if ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort").' '.img_picto($langs->trans('ServiceStatusNotLateShort'),'statut4'); } + if ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLateShort").' '.img_picto($langs->trans('ServiceStatusLate'),'statut3'); } + if ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed").' '.img_picto($langs->trans('ServiceStatusClosed'),'statut6'); } } } @@ -3089,13 +3108,13 @@ class ContratLigne extends CommonObjectLine $this->db->begin(); - $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = 4,"; + $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = ".ContratLigne::STATUS_OPEN.","; $sql .= " date_ouverture = " . (dol_strlen($date) != 0 ? "'" . $this->db->idate($date) . "'" : "null") . ","; if ($date_end >= 0) $sql .= " date_fin_validite = " . (dol_strlen($date_end) != 0 ? "'" . $this->db->idate($date_end) . "'" : "null") . ","; $sql .= " fk_user_ouverture = " . $user->id . ","; $sql .= " date_cloture = null,"; $sql .= " commentaire = '" . $this->db->escape($comment) . "'"; - $sql .= " WHERE rowid = " . $this->id . " AND (statut = 0 OR statut = 3 OR statut = 5)"; + $sql .= " WHERE rowid = " . $this->id . " AND (statut = ".ContratLigne::STATUS_INITIAL." OR statut = ".ContratLigne::STATUS_CLOSED.")"; dol_syslog(get_class($this) . "::active_line", LOG_DEBUG); $resql = $this->db->query($sql); @@ -3107,7 +3126,7 @@ class ContratLigne extends CommonObjectLine if (! $error) { - $this->statut = 4; + $this->statut = ContratLigne::STATUS_OPEN; $this->date_ouverture = $date; $this->date_fin_validite = $date_end; $this->fk_user_ouverture = $user->id; @@ -3153,11 +3172,11 @@ class ContratLigne extends CommonObjectLine $this->db->begin(); - $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = 5,"; + $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = ".ContratLigne::STATUS_CLOSED.","; $sql .= " date_cloture = '" . $this->db->idate($date_end) . "',"; $sql .= " fk_user_cloture = " . $user->id . ","; $sql .= " commentaire = '" . $this->db->escape($comment) . "'"; - $sql .= " WHERE rowid = " . $this->id . " AND statut = 4"; + $sql .= " WHERE rowid = " . $this->id . " AND statut = ".ContratLigne::STATUS_OPEN; $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 1b81d9d13f6..4d403198eb8 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -33,9 +33,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } - -$langs->load("contracts"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('contracts', 'companies')); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 4bc2747a829..0208d68f80d 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -37,9 +37,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("other"); -$langs->load("products"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'products', 'contracts')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); @@ -181,7 +180,7 @@ if ($object->id) print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize,1,1).'
'; print ''; diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 5d3a3603b8f..b78bf52b6be 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -28,9 +28,8 @@ require ("../main.inc.php"); require_once (DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); require_once (DOL_DOCUMENT_ROOT."/product/class/product.class.php"); -$langs->load("products"); -$langs->load("companies"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array('products', 'companies', 'contracts')); $sortfield=GETPOST('sortfield','alpha'); $sortorder=GETPOST('sortorder','alpha'); diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index b6c92eac27e..8899351c284 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -30,6 +30,7 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } +// Load translation files required by the page $langs->load("contracts"); $action = GETPOST('action','alpha'); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 94118d415bf..49b35fdf7e1 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -6,7 +6,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2016-2018 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 @@ -35,16 +35,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -$langs->load("contracts"); -$langs->load("products"); -$langs->load("companies"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('contracts', 'products', 'companies', 'compta')); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'contractlist'; // To manage different context of search $search_name=GETPOST('search_name'); $search_email=GETPOST('search_email'); @@ -95,10 +94,8 @@ $staticcontratligne=new ContratLigne($db); if ($search_status == '') $search_status=1; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$contextpage='contractlist'; - -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array($contextpage)); +$object = new Contrat($db); +$hookmanager->initHooks(array('contractlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -205,8 +202,6 @@ $formother = new FormOther($db); $socstatic = new Societe($db); $contracttmp = new Contrat($db); -llxHeader('', $langs->trans("Contracts")); - $sql = 'SELECT'; $sql.= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,"; $sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; @@ -304,494 +299,523 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql.= $db->plimit($limit + 1, $offset); $resql=$db->query($sql); -if ($resql) +if (! $resql) { - $num = $db->num_rows($resql); - $i = 0; + dol_print_error($db); + exit; +} - $arrayofselected=is_array($toselect)?$toselect:array(); +$num = $db->num_rows($resql); - if ($socid > 0) +// Direct jump if only one record found +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) +{ + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".DOL_URL_ROOT.'/contrat/card.php?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $langs->trans("Contracts")); + +$i = 0; + +$arrayofselected=is_array($toselect)?$toselect:array(); + +if ($socid > 0) +{ + $soc = new Societe($db); + $soc->fetch($socid); + if (empty($search_name)) $search_name = $soc->name; +} + +$param=''; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; +if ($sall != '') $param.='&sall='.urlencode($sall); +if ($search_contract != '') $param.='&search_contract='.urlencode($search_contract); +if ($search_name != '') $param.='&search_name='.urlencode($search_name); +if ($search_email != '') $param.='&search_email='.urlencode($search_email); +if ($search_ref_customer != '') $param.='&search_ref_customer='.urlencode($search_ref_customer); +if ($search_ref_supplier != '') $param.='&search_ref_supplier='.urlencode($search_ref_supplier); +if ($search_op2df != '') $param.='&search_op2df='.urlencode($search_op2df); +if ($search_dfyear != '') $param.='&search_dfyear='.urlencode($search_dfyear); +if ($search_dfmonth != '') $param.='&search_dfmonth='.urlencode($search_dfmonth); +if ($search_sale != '') $param.='&search_sale=' .urlencode($search_sale); +if ($search_user != '') $param.='&search_user=' .urlencode($search_user); +if ($search_product_category != '') $param.='&search_product_category=' .urlencode($search_product_category); +if ($show_files) $param.='&show_files=' .urlencode($show_files); +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +// List of mass actions available +$arrayofmassactions = array( + 'presend'=>$langs->trans("SendByMail"), + 'builddoc'=>$langs->trans("PDFMerge"), +); +if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); +if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +$massactionbutton=$form->selectMassAction('', $arrayofmassactions); + +$newcardbutton=''; +if ($user->rights->contrat->creer) +{ + $newcardbutton=''.$langs->trans('NewContractSubscription').''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, $newcardbutton, '', $limit); + +$topicmail="SendContractRef"; +$modelmail="contract"; +$objecttmp=new Contrat($db); +$trackid='con'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +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' +if ($user->rights->societe->client->voir || $socid) +{ + $langs->load("commercial"); + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; + $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user,0,1,'maxwidth200'); + $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, '', 'maxwidth200'); + $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, 'maxwidth300', 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 $moreforfilter; + print '
'; +} + +$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; +$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); + +print '
'; +print ''."\n"; + +print ''; +if (! empty($arrayfields['c.ref']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['c.ref_customer']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['c.ref_supplier']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['s.nom']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['s.email']['checked'])) +{ + print ''; +} +// Town +if (! empty($arrayfields['s.town']['checked'])) print ''; +// Zip +if (! empty($arrayfields['s.zip']['checked'])) print ''; +// State +if (! empty($arrayfields['state.nom']['checked'])) +{ + print ''; +} +// Country +if (! empty($arrayfields['country.code_iso']['checked'])) +{ + print ''; +} +// Company type +if (! empty($arrayfields['typent.code']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['sale_representative']['checked'])) +{ + print ''; +} +if (! empty($arrayfields['c.date_contrat']['checked'])) +{ + // Date contract + print ''; +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + +// 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['c.datec']['checked'])) +{ + print ''; +} +// Date modification +if (! empty($arrayfields['c.tms']['checked'])) +{ + print ''; +} +// First end date +if (! empty($arrayfields['lower_planned_end_date']['checked'])) +{ + print ''; +} +// Status +if (! empty($arrayfields['status']['checked'])) +{ + print ''; +} +print ''; +print "\n"; + +print ''; +if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder); +if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; +// Hook fields +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); +$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['lower_planned_end_date']['checked'])) print_liste_field_titre($arrayfields['lower_planned_end_date']['label'],$_SERVER["PHP_SELF"],"lower_planned_end_date","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['status']['checked'])) +{ + 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($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch '); +print "\n"; + +while ($i < min($num,$limit)) +{ + $obj = $db->fetch_object($resql); + + $contracttmp->ref=$obj->ref; + $contracttmp->id=$obj->rowid; + $contracttmp->ref_customer=$obj->ref_customer; + $contracttmp->ref_supplier=$obj->ref_supplier; + + if ($obj->socid > 0) { - $soc = new Societe($db); - $soc->fetch($socid); - if (empty($search_name)) $search_name = $soc->name; + $result=$socstatic->fetch($obj->socid); } - $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; - if ($sall != '') $param.='&sall='.urlencode($sall); - if ($search_contract != '') $param.='&search_contract='.urlencode($search_contract); - if ($search_name != '') $param.='&search_name='.urlencode($search_name); - if ($search_email != '') $param.='&search_email='.urlencode($search_email); - if ($search_ref_customer != '') $param.='&search_ref_customer='.urlencode($search_ref_customer); - if ($search_ref_supplier != '') $param.='&search_ref_supplier='.urlencode($search_ref_supplier); - if ($search_op2df != '') $param.='&search_op2df='.urlencode($search_op2df); - if ($search_dfyear != '') $param.='&search_dfyear='.urlencode($search_dfyear); - if ($search_dfmonth != '') $param.='&search_dfmonth='.urlencode($search_dfmonth); - if ($search_sale != '') $param.='&search_sale=' .urlencode($search_sale); - if ($search_user != '') $param.='&search_user=' .urlencode($search_user); - if ($search_product_category != '') $param.='&search_product_category=' .urlencode($search_product_category); - if ($show_files) $param.='&show_files=' .urlencode($show_files); - if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - - // List of mass actions available - $arrayofmassactions = array( - 'presend'=>$langs->trans("SendByMail"), - 'builddoc'=>$langs->trans("PDFMerge"), - ); - if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); - if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); - $massactionbutton=$form->selectMassAction('', $arrayofmassactions); - - print ''; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, '', '', $limit); - - $topicmail="SendContractRef"; - $modelmail="contract"; - $objecttmp=new Contrat($db); - $trackid='con'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - - 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' - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter.='
'; - $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user,0,1,'maxwidth200'); - $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, '', 'maxwidth200'); - $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, 'maxwidth300', 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 $moreforfilter; - print '
'; - } - - $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); - - print '
'; - print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print $form->select_country($search_country,'search_country','',0,'maxwidth100'); + print ''; + print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); + print ''; + //print $langs->trans('Month').': '; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + //print ' '.$langs->trans('Year').': '; + $syear = $year; + print $formother->selectyear($syear,'year',1, 20, 5); + print ''; + print ''; + print ''; + $arrayofoperators=array('0'=>'','='=>'=','<='=>'<=','>='=>'>='); + print $form->selectarray('search_op2df',$arrayofoperators,$search_op2df,0); + print '
'; + print $formother->select_month($search_dfmonth, 'search_dfmonth', 1, 0, 'valignmiddle'); + print ' '; + $formother->select_year($search_dfyear, 'search_dfyear', 1, 20, 5, 0, 0, '', 'valignmiddle'); + print '
'; +$searchpicto=$form->showFilterButtons(); +print $searchpicto; +print '
'."\n"; - - print ''; + print ''; if (! empty($arrayfields['c.ref']['checked'])) { - print ''; + print ''; } if (! empty($arrayfields['c.ref_customer']['checked'])) { - print ''; + print ''; } if (! empty($arrayfields['c.ref_supplier']['checked'])) { - print ''; + print ''; } if (! empty($arrayfields['s.nom']['checked'])) { - print ''; } if (! empty($arrayfields['s.email']['checked'])) { - print ''; + print ''; } // Town - if (! empty($arrayfields['s.town']['checked'])) print ''; + if (! empty($arrayfields['s.town']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } // Zip - if (! empty($arrayfields['s.zip']['checked'])) print ''; + if (! empty($arrayfields['s.zip']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } // State if (! empty($arrayfields['state.nom']['checked'])) { - print ''; + print "\n"; + if (! $i) $totalarray['nbfield']++; } // Country if (! empty($arrayfields['country.code_iso']['checked'])) { - print ''; + if (! $i) $totalarray['nbfield']++; } - // Company type + // Type ent if (! empty($arrayfields['typent.code']['checked'])) { - print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['sale_representative']['checked'])) { - print ''; - } - if (! empty($arrayfields['c.date_contrat']['checked'])) - { - // Date contract - print ''; } + // Date + if (! empty($arrayfields['c.date_contrat']['checked'])) + { + print ''; + } // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; - + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields); - $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by 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['c.datec']['checked'])) { - print ''; + if (! $i) $totalarray['nbfield']++; } // Date modification if (! empty($arrayfields['c.tms']['checked'])) { - print ''; + if (! $i) $totalarray['nbfield']++; } - // First end date + // Date lower end date if (! empty($arrayfields['lower_planned_end_date']['checked'])) { - print ''; + print ''; + if (! $i) $totalarray['nbfield']++; } // Status if (! empty($arrayfields['status']['checked'])) { - print ''; + print ''; + print ''; + print ''; + print ''; + } + // Action column + print ''; + if (! $i) $totalarray['nbfield']++; + print "\n"; - - print ''; - if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); - if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); - if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder); - if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; - // 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['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['lower_planned_end_date']['checked'])) print_liste_field_titre($arrayfields['lower_planned_end_date']['label'],$_SERVER["PHP_SELF"],"lower_planned_end_date","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['status']['checked'])) - { - 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($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - while ($i < min($num,$limit)) - { - $obj = $db->fetch_object($resql); - - $contracttmp->ref=$obj->ref; - $contracttmp->id=$obj->rowid; - $contracttmp->ref_customer=$obj->ref_customer; - $contracttmp->ref_supplier=$obj->ref_supplier; - - if ($obj->socid > 0) - { - $result=$socstatic->fetch($obj->socid); - } - - print ''; - if (! empty($arrayfields['c.ref']['checked'])) - { - print ''; - - print ''; - } - if (! empty($arrayfields['c.ref_customer']['checked'])) - { - print ''; - } - if (! empty($arrayfields['c.ref_supplier']['checked'])) - { - print ''; - } - if (! empty($arrayfields['s.nom']['checked'])) - { - print ''; - } - if (! empty($arrayfields['s.email']['checked'])) - { - print ''; - } - // Town - if (! empty($arrayfields['s.town']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // Zip - if (! empty($arrayfields['s.zip']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // State - if (! empty($arrayfields['state.nom']['checked'])) - { - print "\n"; - if (! $i) $totalarray['nbfield']++; - } - // Country - if (! empty($arrayfields['country.code_iso']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // Type ent - if (! empty($arrayfields['typent.code']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - if (! empty($arrayfields['sale_representative']['checked'])) - { - // Sales representatives - print ''; - } - // Date - if (! empty($arrayfields['c.date_contrat']['checked'])) - { - print ''; - } - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - // 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['c.datec']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // Date modification - if (! empty($arrayfields['c.tms']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // Date lower end date - if (! empty($arrayfields['lower_planned_end_date']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - // Status - if (! empty($arrayfields['status']['checked'])) - { - print ''; - print ''; - print ''; - print ''; - } - // Action column - print ''; - if (! $i) $totalarray['nbfield']++; - - print "\n"; - $i++; - } - $db->free($resql); - - print '
'; - print ''; + print ''; + print $contracttmp->getNomUrl(1); + if ($obj->nb_late) print img_warning($langs->trans("Late")); + if (!empty($obj->note_private) || !empty($obj->note_public)) + { + print ' '; + print ''.img_picto($langs->trans("ViewPrivateNote"),'object_generic').''; + print ''; + } + + $filename=dol_sanitizeFileName($obj->ref); + $filedir=$conf->contrat->dir_output . '/' . dol_sanitizeFileName($obj->ref); + $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; + print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir); + print ''; - print ''; - print ''.$obj->ref_customer.''; - print ''; - print ''.$obj->ref_supplier.''; - print ''; + print ''; + //print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''; + if ($obj->socid > 0) + { + print $socstatic->getNomUrl(1, ''); + } print ''; - print ''; - print ''.$obj->email.''; + print $obj->town; + print ''; + print $obj->zip; + print ''; - print ''; - print '".$obj->state_name."'; - print $form->select_country($search_country,'search_country','',0,'maxwidth100'); + print ''; + $tmparray=getCountry($obj->fk_pays,'all'); + print $tmparray['label']; print ''; - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); + print ''; + if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); + print $typenArray[$obj->typent_code]; print ''; - //print $langs->trans('Month').': '; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - //print ' '.$langs->trans('Year').': '; - $syear = $year; - print $formother->selectyear($syear,'year',1, 20, 5, 0, 0, '', 'widthauto'); + // Sales representatives + print ''; + if ($obj->socid > 0) + { + $listsalesrepresentatives=$socstatic->getSalesRepresentatives($user); + if ($listsalesrepresentatives < 0) dol_print_error($db); + $nbofsalesrepresentative=count($listsalesrepresentatives); + if ($nbofsalesrepresentative > 3) // We print only number + { + print ''; + print $nbofsalesrepresentative; + print ''; + } + else if ($nbofsalesrepresentative > 0) + { + $userstatic=new User($db); + $j=0; + foreach($listsalesrepresentatives as $val) + { + $userstatic->id=$val['id']; + $userstatic->lastname=$val['lastname']; + $userstatic->firstname=$val['firstname']; + $userstatic->email=$val['email']; + $userstatic->statut=$val['statut']; + $userstatic->entity=$val['entity']; + $userstatic->photo=$val['photo']; + + //print '
': + print $userstatic->getNomUrl(-2); + $j++; + if ($j < $nbofsalesrepresentative) print ' '; + //print '
'; + } + } + //else print $langs->trans("NoSalesRepresentativeAffected"); + } + else + { + print ' '; + } print '
'.dol_print_date($db->jdate($obj->date_contrat), 'day', 'tzuser').''; + print ''; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; + print ''; + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; - $arrayofoperators=array('0'=>'','='=>'=','<='=>'<=','>='=>'>='); - print $form->selectarray('search_op2df',$arrayofoperators,$search_op2df,0); - print '
'; - print $formother->select_month($search_dfmonth, 'search_dfmonth', 1); - print ' '; - $formother->select_year($search_dfyear, 'search_dfyear', 1, 20, 5); - print '
'; + print dol_print_date($db->jdate($obj->lower_planned_end_date), 'day', 'tzuser'); + print ''.($obj->nb_initial>0?$obj->nb_initial:'').''.($obj->nb_running>0?$obj->nb_running:'').''.($obj->nb_expired>0?$obj->nb_expired:'').''.($obj->nb_closed>0 ?$obj->nb_closed:'').''; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected=0; + if (in_array($obj->rowid, $arrayofselected)) $selected=1; + print ''; } - print ''; - $searchpicto=$form->showFilterButtons(); - print $searchpicto; print '
'; - print $contracttmp->getNomUrl(1); - if ($obj->nb_late) print img_warning($langs->trans("Late")); - if (!empty($obj->note_private) || !empty($obj->note_public)) - { - print ' '; - print ''.img_picto($langs->trans("ViewPrivateNote"),'object_generic').''; - print ''; - } - - $filename=dol_sanitizeFileName($obj->ref); - $filedir=$conf->contrat->dir_output . '/' . dol_sanitizeFileName($obj->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; - print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir); - print ''.$obj->ref_customer.''.$obj->ref_supplier.''; - //print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''; - if ($obj->socid > 0) - { - print $socstatic->getNomUrl(1, ''); - } - print ''.$obj->email.''; - print $obj->town; - print ''; - print $obj->zip; - print '".$obj->state_name."'; - $tmparray=getCountry($obj->fk_pays,'all'); - print $tmparray['label']; - print ''; - if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); - print $typenArray[$obj->typent_code]; - print ''; - if ($obj->socid > 0) - { - $listsalesrepresentatives=$socstatic->getSalesRepresentatives($user); - if ($listsalesrepresentatives < 0) dol_print_error($db); - $nbofsalesrepresentative=count($listsalesrepresentatives); - if ($nbofsalesrepresentative > 3) // We print only number - { - print ''; - print $nbofsalesrepresentative; - print ''; - } - else if ($nbofsalesrepresentative > 0) - { - $userstatic=new User($db); - $j=0; - foreach($listsalesrepresentatives as $val) - { - $userstatic->id=$val['id']; - $userstatic->lastname=$val['lastname']; - $userstatic->firstname=$val['firstname']; - $userstatic->email=$val['email']; - $userstatic->statut=$val['statut']; - $userstatic->entity=$val['entity']; - $userstatic->photo=$val['photo']; - - //print '
': - print $userstatic->getNomUrl(-2); - $j++; - if ($j < $nbofsalesrepresentative) print ' '; - //print '
'; - } - } - //else print $langs->trans("NoSalesRepresentativeAffected"); - } - else - { - print ' '; - } - print '
'.dol_print_date($db->jdate($obj->date_contrat), 'day', 'tzuser').''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); - print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); - print ''; - print dol_print_date($db->jdate($obj->lower_planned_end_date), 'day', 'tzuser'); - print ''.($obj->nb_initial>0?$obj->nb_initial:'').''.($obj->nb_running>0?$obj->nb_running:'').''.($obj->nb_expired>0?$obj->nb_expired:'').''.($obj->nb_closed>0 ?$obj->nb_closed:'').''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { - $selected=0; - if (in_array($obj->rowid, $arrayofselected)) $selected=1; - print ''; - } - print '
'; - print '
'; - - print '
'; - - $hidegeneratedfilelistifempty=1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0; - - // Show list of available documents - $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; - $urlsource.=str_replace('&','&',$param); - - $filedir=$diroutputmassaction; - $genallowed=$user->rights->contrat->lire; - $delallowed=$user->rights->contrat->lire; - - print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty); -} -else -{ - dol_print_error($db); + $i++; } +$db->free($resql); + +print '
'; +print '
'; + +print ''; + +$hidegeneratedfilelistifempty=1; +if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0; + +// Show list of available documents +$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; +$urlsource.=str_replace('&','&',$param); + +$filedir=$diroutputmassaction; +$genallowed=$user->rights->contrat->lire; +$delallowed=$user->rights->contrat->lire; + +print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty); llxFooter(); diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index ab76d9aaec3..c160201191a 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -31,8 +31,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("contracts"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'contracts')); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 108fb6d4403..c94be74b0b8 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2018 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 @@ -29,9 +30,8 @@ require_once (DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); require_once (DOL_DOCUMENT_ROOT."/product/class/product.class.php"); require_once (DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); -$langs->load("products"); -$langs->load("contracts"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('products', 'contracts', 'companies')); $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -53,6 +53,7 @@ $search_status=GETPOST("search_status","alpha"); $statut=GETPOST('statut')?GETPOST('statut'):1; $search_product_category=GETPOST('search_product_category','int'); $socid=GETPOST('socid','int'); +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'contractservicelist'.$mode; $opouvertureprevuemonth=GETPOST('opouvertureprevuemonth'); $opouvertureprevueday=GETPOST('opouvertureprevueday'); @@ -74,11 +75,10 @@ $opclotureday=GETPOST('opclotureday'); $opclotureyear=GETPOST('opclotureyear'); $filter_opcloture=GETPOST('filter_opcloture'); -// Initialize context for list -$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'contractservicelist'.$mode; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array($contextpage)); +$object = new ContratLigne($db); +$hookmanager->initHooks(array('contractservicelist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -204,6 +204,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk $sql.= " cd.date_ouverture_prevue,"; $sql.= " cd.date_ouverture,"; $sql.= " cd.date_fin_validite,"; +$sql.= " cd.date_cloture,"; $sql.= " cd.qty,"; $sql.= " cd.total_ht,"; $sql.= " cd.total_tva,"; @@ -255,6 +256,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); @@ -382,7 +388,7 @@ if (! empty($arrayfields['cd.date_cloture']['checked'])) print_liste_field_titre // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters=array('arrayfields'=>$arrayfields); +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (! empty($arrayfields['cd.datec']['checked'])) print_liste_field_titre($arrayfields['cd.datec']['label'],$_SERVER["PHP_SELF"],"cd.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); @@ -525,7 +531,9 @@ print "\n"; $contractstatic=new Contrat($db); $productstatic=new Product($db); -$var=True; $i=0; +$var=true; +$i=0; +$totalarray=array(); while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); @@ -542,6 +550,7 @@ while ($i < min($num,$limit)) print ''; print $contractstatic->getNomUrl(1,16); print ''; + if (! $i) $totalarray['nbfield']++; } // Service if (! empty($arrayfields['p.description']['checked'])) @@ -563,6 +572,7 @@ while ($i < min($num,$limit)) if ($obj->type == 1) print img_object($obj->description,'service').' '.dol_trunc($obj->description,24); } print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['cd.qty']['checked'])) @@ -570,30 +580,45 @@ while ($i < min($num,$limit)) print ''; print $obj->qty; print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['cd.total_ht']['checked'])) { - print ''; + print ''; print price($obj->total_ht); print ''; - } + $totalarray['totalht'] += $obj->total_ht; + if (! $i) { + $totalarray['displaytotalline']++; + $totalarray['nbfield']++; + $totalarray['totalhtfield']=$totalarray['nbfield']; + } + } if (! empty($arrayfields['cd.total_tva']['checked'])) { - print ''; + print ''; print price($obj->total_tva); print ''; - } + $totalarray['totalvat'] += $obj->total_tva; + if (! $i) { + $totalarray['nbfield']++; + $totalarray['totalvatfield']=$totalarray['nbfield']; + $totalarray['displaytotalline']++; + } + } if (! empty($arrayfields['cd.tva_tx']['checked'])) { - print ''; + print ''; print price2num($obj->tva_tx).'%'; print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['cd.subprice']['checked'])) { - print ''; + print ''; print price($obj->subprice); print ''; + if (! $i) $totalarray['nbfield']++; } @@ -606,26 +631,29 @@ while ($i < min($num,$limit)) $companystatic->client=1; print $companystatic->getNomUrl(1,'customer',28); print ''; + if (! $i) $totalarray['nbfield']++; } // Start date if (! empty($arrayfields['cd.date_ouverture_prevue']['checked'])) { print ''; - print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue)):' '); + print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue), 'dayhour'):' '); if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0) print ' '.img_picto($langs->trans("Late"),"warning"); else print '    '; print ''; + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['cd.date_ouverture']['checked'])) { - print ''.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture)):' ').''; + print ''.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour'):' ').''; + if (! $i) $totalarray['nbfield']++; } // End date if (! empty($arrayfields['cd.date_fin_validite']['checked'])) { - print ''.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):' '); + print ''.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour'):' '); if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) { $warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24; @@ -634,10 +662,13 @@ while ($i < min($num,$limit)) } else print '    '; print ''; + if (! $i) $totalarray['nbfield']++; } + // Close date (real end date) if (! empty($arrayfields['cd.date_cloture']['checked'])) { - print ''.dol_print_date($db->jdate($obj->date_cloture)).''; + print ''.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').''; + if (! $i) $totalarray['nbfield']++; } // Extra fields @@ -675,6 +706,7 @@ while ($i < min($num,$limit)) print $staticcontratligne->LibStatut($obj->statut,5,($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0); } print ''; + if (! $i) $totalarray['nbfield']++; } // Action column print ''; @@ -690,6 +722,25 @@ while ($i < min($num,$limit)) print "\n"; $i++; } + +// Show total line +if (isset($totalarray['displaytotalline'])) { + print ''; + $i=0; + while ($i < $totalarray['nbfield']) { + $i++; + if ($i == 1) { + if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").''; + else print ''.$langs->trans("Totalforthispage").''; + } + elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).''; + elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).''; + elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).''; + else print ''; + } + print ''; +} + $db->free($resql); $parameters=array('sql' => $sql); diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index a44f20679b8..a4b18716039 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -35,6 +35,7 @@ global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +// Load translation files required by the page $langs->load("contracts"); $total=0; $ilink=0; @@ -52,10 +53,10 @@ foreach($linkedObjectBlock as $key => $objectlink) date_contrat,'day'); ?> rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) + if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) { $totalcontrat = 0; foreach ($objectlink->lines as $linecontrat) { @@ -65,7 +66,7 @@ foreach($linkedObjectBlock as $key => $objectlink) echo price($totalcontrat); } ?> getLibStatut(7); ?> - ">transnoentitiesnoconv("RemoveLink")); ?> + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 6318e4d5c54..394680f4d8e 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -28,6 +28,7 @@ // $permissiontodelete must be defined // $backurlforlist must be defined // $backtopage may be defined +// $triggermodname may be defined if ($cancel) { @@ -47,13 +48,22 @@ if ($action == 'add' && ! empty($permissiontoadd)) if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Ignore special fields // Set value to insert - if (in_array($object->fields[$key]['type'], array('text', 'html'))) $value = GETPOST($key,'none'); - else $value = GETPOST($key,'alpha'); + if (in_array($object->fields[$key]['type'], array('text', 'html'))) { + $value = GETPOST($key,'none'); + } elseif ($object->fields[$key]['type']=='date') { + $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + } elseif ($object->fields[$key]['type']=='datetime') { + $value = dol_mktime(GETPOST($key.'hour'), GETPOST($key.'min'), 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + } elseif ($object->fields[$key]['type']=='price') { + $value = price2num(GETPOST($key)); + } else { + $value = GETPOST($key,'alpha'); + } if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value=''; // This is an implicit foreign key field if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field $object->$key=$value; - if ($val['notnull'] > 0 && $object->$key == '') + if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { $error++; setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv($val['label'])), null, 'errors'); @@ -66,7 +76,7 @@ if ($action == 'add' && ! empty($permissiontoadd)) if ($result > 0) { // Creation OK - $urltogo=$backtopage?$backtopage:$backurlforlist; + $urltogo=$backtopage?str_replace('__ID__', $result, $backtopage):$backurlforlist; header("Location: ".$urltogo); exit; } @@ -93,13 +103,22 @@ if ($action == 'update' && ! empty($permissiontoadd)) if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Ignore special fields // Set value to update - if (in_array($object->fields[$key]['type'], array('text', 'html'))) $value = GETPOST($key,'none'); - else $value = GETPOST($key,'alpha'); + if (in_array($object->fields[$key]['type'], array('text', 'html'))) { + $value = GETPOST($key,'none'); + } elseif ($object->fields[$key]['type']=='date') { + $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + } elseif ($object->fields[$key]['type']=='datetime') { + $value = dol_mktime(GETPOST($key.'hour'), GETPOST($key.'min'), 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + } elseif ($object->fields[$key]['type']=='price') { + $value = price2num(GETPOST($key)); + } else { + $value = GETPOST($key,'alpha'); + } if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value=''; // This is an implicit foreign key field if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field $object->$key=$value; - if ($val['notnull'] > 0 && $object->$key == '') + if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { $error++; setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv($val['label'])), null, 'errors'); @@ -116,8 +135,7 @@ if ($action == 'update' && ! empty($permissiontoadd)) else { // Creation KO - if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='edit'; } } @@ -127,6 +145,27 @@ if ($action == 'update' && ! empty($permissiontoadd)) } } +// Action to update one extrafield +if ($action == "update_extras" && ! empty($permissiontoadd)) +{ + $object->fetch(GETPOST('id','int')); + $attributekey = GETPOST('attribute','alpha'); + $attributekeylong = 'options_'.$attributekey; + $object->array_options['options_'.$attributekey] = GETPOST($attributekeylong,' alpha'); + + $result = $object->insertExtraFields(empty($triggermodname)?'':$triggermodname, $user); + if ($result > 0) + { + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); + $action = 'view'; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit_extras'; + } +} + // Action to delete if ($action == 'confirm_delete' && ! empty($permissiontodelete)) { diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index ff7a89484fa..9d33def496c 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -124,5 +124,13 @@ if ($action == 'remove_file' && $permissioncreate) $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'); + + // Make a redirect to avoid to keep the remove_file into the url that create side effects + $urltoredirect = $_SERVER['REQUEST_URI']; + $urltoredirect = preg_replace('/#builddoc$/', '', $urltoredirect); + $urltoredirect = preg_replace('/action=remove_file&?/', '', $urltoredirect); + + header('Location: '.$urltoredirect); + exit; } diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 6e5ac327e9b..297f7821599 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -27,7 +27,7 @@ // Submit file/link -if (GETPOST('sendit','none') && ! empty($conf->global->MAIN_UPLOAD_DOC)) +if (GETPOST('sendit','alpha') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if (! empty($_FILES)) { diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 5a713168c48..646be9a3f92 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1,5 +1,7 @@ + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 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 @@ -356,6 +358,14 @@ if (! $error && $massaction == 'confirm_presend') $substitutionarray['__CHECK_READ__'] = ''; $parameters=array('mode'=>'formemail'); + + if ( ! empty( $listofobjectthirdparties ) ) { + $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; + } + if ( ! empty( $listofobjectref ) ) { + $parameters['listofobjectref'] = $listofobjectref; + } + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); $subject=make_substitutions($subject, $substitutionarray); @@ -601,6 +611,13 @@ if ($massaction == 'confirm_createbills') { $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_options = $lines[$i]->array_options; + } + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -625,7 +642,8 @@ if ($massaction == 'confirm_createbills') $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, - $lines[$i]->label + $lines[$i]->label, + $array_options ); if ($result > 0) { @@ -727,6 +745,56 @@ if ($massaction == 'confirm_createbills') } } +if (!$error && $massaction == 'cancelorders') +{ + + $db->begin(); + + $nbok = 0; + + + $orders = GETPOST('toselect', 'array'); + foreach ($orders as $id_order) + { + + $cmd = new Commande($db); + if ($cmd->fetch($id_order) <= 0) + continue; + + if ($cmd->statut != Commande::STATUS_VALIDATED) + { + $langs->load('errors'); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); + $error++; + break; + } + else + $result = $cmd->cancel(); + + if ($result < 0) + { + setEventMessages($cmd->error, $cmd->errors, 'errors'); + $error++; + break; + } + else + $nbok++; + } + if (!$error) + { + if ($nbok > 1) + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } +} + + if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search')) { if (empty($diroutputmassaction)) @@ -973,7 +1041,41 @@ if (! $error && $massaction == 'validate' && $permtocreate) //var_dump($listofobjectthirdparties);exit; } } +// Closed records +if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { + $db->begin(); + $objecttmp = new $objectclass($db); + $nbok = 0; + foreach ($toselect as $toselectid) { + $result = $objecttmp->fetch($toselectid); + if ($result > 0) { + $result = $objecttmp->cloture($user, 3); + if ($result <= 0) { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } else + $nbok++; + } + else { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (!$error) { + if ($nbok > 1) + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else { + $db->rollback(); + } +} // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { @@ -986,24 +1088,23 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == $result=$objecttmp->fetch($toselectid); if ($result > 0) { - // Refuse deletion for some status ? - /* - if ($objectclass == 'Facture' && $objecttmp->status == Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; - continue; - }*/ + // Refuse deletion for some objects/status + if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; + continue; + } - if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); else $result = $objecttmp->delete($user); if ($result <= 0) { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; } else $nbok++; } diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 962d00ee4b8..8c81c0efc6a 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -23,8 +23,8 @@ // $mysoc must be defined // $id must be defined -// $paramname must be defined -// $mode must be defined (used to know the automatic BCC to add) +// $paramname may be defined +// $autocopy may be defined (used to know the automatic BCC to add) // $trigger_name must be set (can be '') // $actiontypecode can be set // $object and $uobject may be defined @@ -129,38 +129,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO { $thirdparty=$object; if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; - elseif (! empty($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 an element/object that is not supported'); + + if (is_object($hookmanager)) + { + $parameters=array(); + $reshook=$hookmanager->executeHooks('initSendToSocid',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + } } else $thirdparty = $mysoc; @@ -170,6 +146,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $sendtocc=''; $sendtobcc=''; $sendtoid = array(); + $sendtouserid=array(); + $sendtoccuserid=array(); // Define $sendto $receiver=$_POST['receiver']; @@ -191,7 +169,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO // Recipient was provided from combo list if ($val == 'thirdparty') // Id of third party { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + $tmparray[] = dol_string_nospecial($thirdparty->name, ' ', array(",")).' <'.$thirdparty->email.'>'; } elseif ($val) // Id du contact { @@ -200,6 +178,20 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } } } + if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) + { + $receiveruser=$_POST['receiveruser']; + if (is_array($receiveruser) && count($receiveruser)>0) + { + $fuserdest = new User($db); + foreach($receiveruser as $key=>$val) + { + $tmparray[] = $fuserdest->user_get_property($val,'email'); + $sendtouserid[] = $val; + } + } + } + $sendto=implode(',',$tmparray); // Define $sendtocc @@ -221,7 +213,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO // Recipient was provided from combo list if ($val == 'thirdparty') // Id of third party { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + $tmparray[] = dol_string_nospecial($thirdparty->name, ' ', array(",")).' <'.$thirdparty->email.'>'; } elseif ($val) // Id du contact { @@ -230,6 +222,19 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } } } + if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) { + $receiverccuser=$_POST['receiverccuser']; + + if (is_array($receiverccuser) && count($receiverccuser)>0) + { + $fuserdest = new User($db); + foreach($receiverccuser as $key=>$val) + { + $tmparray[] = $fuserdest->user_get_property($val,'email'); + $sendtoccuserid[] = $val; + } + } + } $sendtocc=implode(',',$tmparray); if (dol_strlen($sendto)) @@ -245,13 +250,13 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $fromtype = GETPOST('fromtype','alpha'); if ($fromtype === 'robot') { - $from = $conf->global->MAIN_MAIL_EMAIL_FROM .' <'.$conf->global->MAIN_MAIL_EMAIL_FROM.'>'; + $from = dol_string_nospecial($conf->global->MAIN_MAIL_EMAIL_FROM, ' ', array(",")) .' <'.$conf->global->MAIN_MAIL_EMAIL_FROM.'>'; } elseif ($fromtype === 'user') { - $from = $user->getFullName($langs) .' <'.$user->email.'>'; + $from = dol_string_nospecial($user->getFullName($langs), ' ', array(",")) .' <'.$user->email.'>'; } elseif ($fromtype === 'company') { - $from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; + $from = dol_string_nospecial($conf->global->MAIN_INFO_SOCIETE_NOM, ' ', array(",")) .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; } elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { $tmp=explode(',', $user->email_aliases); @@ -267,14 +272,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $obj = $db->fetch_object($resql); if ($obj) { - $from = $obj->label.' <'.$obj->email.'>'; + $from = dol_string_nospecial($obj->label, ' ', array(",")).' <'.$obj->email.'>'; } } else { - $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; + $from = dol_string_nospecial($_POST['fromname'], ' ', array(",")) . ' <' . $_POST['frommail'] .'>'; } - $replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>'; + $replyto = dol_string_nospecial($_POST['replytoname'], ' ', array(",")). ' <' . $_POST['replytomail'].'>'; $message = GETPOST('message','none'); $subject = GETPOST('subject','none'); @@ -318,7 +323,6 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - // Feature to push mail sent into Sent folder /* This code must be now included into the hook mail, method sendMailAfter if (! empty($conf->dolimail->enabled)) @@ -344,9 +348,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO 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) + if (false === $mailboxconfig->mbox) { - $info = FALSE; + $info = false; $err = $langs->trans('Error3_Imap_Connection_Error'); setEventMessages($err,$mailboxconfig->element, null, 'errors'); } @@ -386,7 +390,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($mailfile->error) { - setEventMessage($mailfile->error, 'errors'); + setEventMessages($mailfile->error, $mailfile->errors, 'errors'); $action='presend'; } else @@ -415,7 +419,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } }*/ - // Initialisation of datas + // Initialisation of datas of object to call trigger if (is_object($object)) { if (empty($actiontypecode)) $actiontypecode='AC_OTH_AUTO'; // Event insert into agenda automatically @@ -431,6 +435,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if (is_array($attachedfiles) && count($attachedfiles)>0) { $object->attachedfiles = $attachedfiles; } + if (is_array($sendtouserid) && count($sendtouserid)>0 && !empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) { + $object->sendtouserid = $sendtouserid; + } // Call of triggers if (! empty($trigger_name)) @@ -449,10 +456,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); setEventMessages($mesg, null, 'mesgs'); - $moreparam=''; - if (isset($paramname2) || isset($paramval2)) $moreparam.= '&'.($paramname2?$paramname2:'mid').'='.$paramval2; - header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').$moreparam); - exit; + $moreparam=''; + if (isset($paramname2) || isset($paramval2)) $moreparam.= '&'.($paramname2?$paramname2:'mid').'='.$paramval2; + header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').$moreparam); + exit; } else { diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index eadce1dc74c..03ff1491e49 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -31,13 +31,13 @@ if ($action == 'update' && is_array($arrayofparameters)) { $db->begin(); - $ok=True; + $ok=true; foreach($arrayofparameters as $key => $val) { $result=dolibarr_set_const($db,$key,GETPOST($key, 'alpha'),'chaine',0,'',$conf->entity); if ($result < 0) { - $ok=False; + $ok=false; break; } } diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 4d72b576429..f69cc85e026 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -93,7 +93,7 @@ if (empty($url)) else $url=DOL_URL_ROOT.'/ecm/index.php'; } -// Load traductions files +// Load translation files required by the page $langs->loadLangs(array("ecm","companies","other")); // Security check diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 796ced332ab..59fe3385c61 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -53,6 +53,7 @@ else // For no ajax call if (empty($url)) $url=DOL_URL_ROOT.'/ecm/index.php'; } +// Load translation files required by the page $langs->load("ecm"); // Define fullpathselecteddir. diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index 612f38bb05b..f6bd5b5214a 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -26,8 +26,6 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; @@ -70,7 +68,7 @@ if ($boxorder && $zone != '' && $userid > 0) dol_syslog("AjaxBox boxorder=".$boxorder." zone=".$zone." userid=".$userid, LOG_DEBUG); $result=InfoBox::saveboxorder($db,$zone,$boxorder,$userid); - if ($result > 0) + if ($result > 0) { $langs->load("boxes"); if (! GETPOST('closing')) diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index f79753260d7..9e9f8a0d799 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -26,7 +26,6 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index 1c7c7a56e4b..b03b9f128cf 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -23,10 +23,7 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require '../../main.inc.php'; diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index f8a636e52a5..908c1ef9f11 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -25,7 +25,6 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); include '../../main.inc.php'; diff --git a/htdocs/core/ajax/fileupload.php b/htdocs/core/ajax/fileupload.php index 6eb4d5836b8..9405aa26cf1 100644 --- a/htdocs/core/ajax/fileupload.php +++ b/htdocs/core/ajax/fileupload.php @@ -21,16 +21,10 @@ * \brief File to return Ajax response on file upload */ -//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'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show 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) require '../../main.inc.php'; diff --git a/htdocs/core/ajax/getaccountcurrency.php b/htdocs/core/ajax/getaccountcurrency.php index 40e52672c0e..2289d8e1c0f 100644 --- a/htdocs/core/ajax/getaccountcurrency.php +++ b/htdocs/core/ajax/getaccountcurrency.php @@ -22,10 +22,7 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require '../../main.inc.php'; diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 7e9e541c768..099f66ba3de 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -22,10 +22,8 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index d4a101fb497..577f659b2cc 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -22,10 +22,8 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require('../../main.inc.php'); diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 71a5a0aac88..98f18df8a68 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -28,7 +28,6 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; @@ -63,7 +62,7 @@ if ((isset($_POST['roworder']) && ! empty($_POST['roworder'])) && (isset($_POST[ $row->table_element_line = $table_element_line; $row->fk_element = $fk_element; $row->id = $element_id; - $row->line_ajaxorder($newrowordertab); // This update field rank or position in table table_element_line + $row->line_ajaxorder($newrowordertab); // This update field rank or position in table row->table_element_line // Reorder line to have position of children lines sharing same counter than parent lines // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database. diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 61c2dca675b..7070d1a8799 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -22,10 +22,8 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; diff --git a/htdocs/core/ajax/security.php b/htdocs/core/ajax/security.php index cc7335618d0..fa1ce2103d4 100644 --- a/htdocs/core/ajax/security.php +++ b/htdocs/core/ajax/security.php @@ -27,7 +27,6 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); require '../../main.inc.php'; diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 4256d14f203..57483848c4e 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -27,10 +27,9 @@ if (! isset($usedbyinclude) || empty($usedbyinclude)) { if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal - //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); - if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); - if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); - if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); + if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); + if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREDIRECTBYMAINTOLOGIN')) define('NOREDIRECTBYMAINTOLOGIN','1'); $res=@include '../../main.inc.php'; @@ -126,7 +125,7 @@ if (! empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_ // HR if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) { - $arrayresult['searchintouser']=array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):'')); + $arrayresult['searchintouser']=array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/list.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):'')); } if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) { diff --git a/htdocs/core/ajax/vatrates.php b/htdocs/core/ajax/vatrates.php index ac9691bfa25..3826e521d06 100644 --- a/htdocs/core/ajax/vatrates.php +++ b/htdocs/core/ajax/vatrates.php @@ -22,10 +22,7 @@ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); require '../../main.inc.php'; diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index a67d2c3ac02..a8dc7f1231d 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France + * Copyright (C) 2018 Josep Lluís Amador * * 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 @@ -20,7 +21,7 @@ /** * \file htdocs/core/boxes/box_contacts.php - * \ingroup societes + * \ingroup contacts * \brief Module to show box of contacts */ @@ -57,7 +58,7 @@ class box_contacts extends ModeleBoxes $this->db=$db; - $this->hidden=! ($user->rights->societe->lire); + $this->hidden=! ($user->rights->societe->lire && $user->rights->societe->contact->lire); } /** @@ -75,114 +76,113 @@ class box_contacts extends ModeleBoxes $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedContacts",$max)); - if ($user->rights->societe->lire) + if ($user->rights->societe->lire && $user->rights->societe->contact->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.= ", 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.= ", 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"; - $sql.= " WHERE sp.entity IN (".getEntity('societe').")"; + $sql.= " WHERE sp.entity IN (".getEntity('socpeople').")"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($user->societe_id) $sql.= " AND sp.fk_soc = ".$user->societe_id; $sql.= " ORDER BY sp.tms DESC"; $sql.= $db->plimit($max, 0); $result = $db->query($sql); - if ($result) { + if ($result) { $num = $db->num_rows($result); $contactstatic=new Contact($db); $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); - $contactstatic->id=$objp->id; + $contactstatic->id=$objp->id; $contactstatic->lastname=$objp->lastname; - $contactstatic->firstname=$objp->firstname; - $contactstatic->civility_id=$objp->civility_id; + $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; + $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->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; + $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' => '', - 'text' => $contactstatic->getNomUrl(1), - 'asis' => 1, - ); + $this->info_box_contents[$line][] = array( + 'td' => '', + 'text' => $contactstatic->getNomUrl(1), + 'asis' => 1, + ); - $this->info_box_contents[$line][] = array( - 'td' => '', - 'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''), - 'asis' => 1, - ); + $this->info_box_contents[$line][] = array( + 'td' => '', + 'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''), + 'asis' => 1, + ); - $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($datem, "day"), - ); + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => dol_print_date($datem, "day"), + ); - $this->info_box_contents[$line][] = array( - 'td' => 'align="right" class="nowrap" width="18"', - 'text' => $contactstatic->getLibStatut(3), - 'asis'=>1, - ); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" class="nowrap" width="18"', + 'text' => $contactstatic->getLibStatut(3), + 'asis'=>1, + ); - $line++; - } + $line++; + } - if ($num==0) - $this->info_box_contents[$line][0] = array( - 'td' => 'align="center"', - 'text'=>$langs->trans("NoRecordedContacts"), - ); + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedContacts"), + ); - $db->free($result); - } else { - $this->info_box_contents[0][0] = array( - 'td' => '', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql), - ); - } - } else { - $this->info_box_contents[0][0] = array( - 'td' => 'align="left" class="nohover opacitymedium"', - 'text' => $langs->trans("ReadPermissionNotAllowed") - ); - } - - } + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => '', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left" class="nohover opacitymedium"', + '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 - * @param int $nooutput No print, only return string + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) - { + function showBox($head = null, $contents = null, $nooutput=0) + { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index d665d70da56..abbdc7b7c71 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -222,13 +222,14 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; if ($shownb && $showtot) diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index efd7de41e5a..53d9ce08059 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -219,13 +219,14 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; if ($shownb && $showtot) diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 699f2db902b..05a0ff498ec 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -218,13 +218,14 @@ class box_graph_orders_permonth extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; if ($shownb && $showtot) diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index f49f38c1228..e88ed46be72 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -217,13 +217,14 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; if ($shownb && $showtot) diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 69a09e8aad2..39a7a3984d2 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -338,6 +338,7 @@ class box_graph_product_distribution extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; if (! empty($conf->facture->enabled) || ! empty($user->rights->facture->lire)) { @@ -355,7 +356,7 @@ class box_graph_product_distribution extends ModeleBoxes } $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 50e3cbe9bf8..bddf4a27e64 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -219,13 +219,14 @@ class box_graph_propales_permonth extends ModeleBoxes $stringtoshow.='
'; // hideobject is to start hidden $stringtoshow.='
'; $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow.='   '; $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; - $stringtoshow.=''; + $stringtoshow.=''; $stringtoshow.='
'; $stringtoshow.='
'; if ($shownb && $showtot) diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php new file mode 100644 index 00000000000..a0613d58f3e --- /dev/null +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -0,0 +1,189 @@ + + * 2016 Christophe Battarel + * + * 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 core/boxes/box_last_modified_ticket.php + * \ingroup ticket + * \brief This box shows latest modified tickets + */ +require_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box + */ +class box_last_modified_ticket extends ModeleBoxes +{ + + public $boxcode = "box_last_modified_ticket"; + public $boximg = "ticket"; + public $boxlabel; + public $depends = array("ticket"); + public $db; + public $param; + public $info_box_head = array(); + public $info_box_contents = array(); + + /** + * Constructor + */ + public function __construct() + { + global $langs; + $langs->load("boxes"); + + $this->boxlabel = $langs->transnoentitiesnoconv("BoxLastModifiedTicket"); + } + + /** + * Load data into info_box_contents array to show array later. + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs, $db; + + $this->max = $max; + + dol_include_once("/ticket/class/ticket.class.php"); + + $text = $langs->trans("BoxLastModifiedTicketDescription", $max); + $this->info_box_head = array( + 'text' => $text, + 'limit' => dol_strlen($text) + ); + + $this->info_box_contents[0][0] = array('td' => 'align="left"', + 'text' => $langs->trans("BoxLastModifiedTicketContent")); + + if ($user->rights->ticket->read) { + $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; + $sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; + $sql.= ", s.nom as company_name"; + $sql.= " FROM ".MAIN_DB_PREFIX."ticket as t"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_severity as severity ON severity.code=t.severity_code"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=t.fk_soc"; + + $sql.= " WHERE t.entity = ".$conf->entity; + // $sql.= " AND e.rowid = er.fk_event"; + //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->societe_id) { + $sql.= " AND t.fk_soc= ".$user->societe_id; + } + + $sql.= " ORDER BY t.tms DESC, t.rowid DESC "; + $sql.= $db->plimit($max, 0); + + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $now=gmmktime(); + + $i = 0; + + while ($i < $num) { + $objp = $db->fetch_object($resql); + $datec=$db->jdate($objp->datec); + $dateterm=$db->jdate($objp->fin_validite); + $dateclose=$db->jdate($objp->date_cloture); + $late = ''; + + $ticket = new Ticket($this->db); + + + $r=0; + + // Picto + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1)); + $r++; + + // Id + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'text' => $objp->ref, + 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1)); + $r++; + + // Subject + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'text' => $objp->subject, // Some event have no ref + 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1)); + $r++; + + // Customer + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'logo' => ($objp->fk_soc>0?'company':''), + 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email), + 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'') + ); + $r++; + + + // Date creation + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($db->idate($objp->datec), 'dayhour') + ); + $r++; + + // Statut + $ticketstat = new Ticket($this->db); + $ticketstat->fk_statut = $objp->fk_statut; + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="right"', + 'text' => $ticketstat->getLibStatut(3) + ); + $r++; + + $i++; + } + + if ($num==0) { + $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("BoxLastModifiedTicketNoRecordedTickets")); + } + } else { + dol_print_error($db); + } + } else { + $this->info_box_contents[0][0] = array('td' => '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 + * @param int $nooutput No print, only return string + * @return string + */ + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php new file mode 100644 index 00000000000..2dfa71af904 --- /dev/null +++ b/htdocs/core/boxes/box_last_ticket.php @@ -0,0 +1,189 @@ + + * 2016 Christophe Battarel + * + * 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 core/boxes/box_ticket_latest.php + * \ingroup ticket + * \brief This box shows latest created tickets + */ +require_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box + */ +class box_last_ticket extends ModeleBoxes +{ + + public $boxcode = "box_last_ticket"; + public $boximg = "ticket"; + public $boxlabel; + public $depends = array("ticket"); + public $db; + public $param; + public $info_box_head = array(); + public $info_box_contents = array(); + + /** + * Constructor + */ + public function __construct() + { + global $langs; + $langs->load("boxes"); + + $this->boxlabel = $langs->transnoentitiesnoconv("BoxLastTicket"); + } + + /** + * Load data into info_box_contents array to show array later. + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs, $db; + + $this->max = $max; + + dol_include_once("/ticket/class/ticket.class.php"); + + $text = $langs->trans("BoxLastTicketDescription", $max); + $this->info_box_head = array( + 'text' => $text, + 'limit' => dol_strlen($text), + ); + + $this->info_box_contents[0][0] = array('td' => 'align="left"', + 'text' => $langs->trans("BoxLastTicketContent")); + + if ($user->rights->ticket->read) { + $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; + $sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; + $sql .= ", s.nom as company_name"; + $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_severity as severity ON severity.code=t.severity_code"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid=t.fk_soc"; + + $sql .= " WHERE t.entity = " . $conf->entity; + // $sql.= " AND e.rowid = er.fk_event"; + //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->societe_id) { + $sql .= " AND t.fk_soc= " . $user->societe_id; + } + + //$sql.= " AND t.fk_statut > 9"; + + $sql .= " ORDER BY t.datec DESC, t.rowid DESC "; + $sql .= $db->plimit($max, 0); + + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $now = gmmktime(); + + $i = 0; + + while ($i < $num) { + $objp = $db->fetch_object($resql); + $datec = $db->jdate($objp->datec); + $dateterm = $db->jdate($objp->fin_validite); + $dateclose = $db->jdate($objp->date_cloture); + $late = ''; + + $ticket = new Ticket($this->db); + + $r = 0; + + // Picto + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1)); + $r++; + + // Id + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'text' => $objp->ref, + 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1)); + $r++; + + // Subject + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'text' => $objp->subject, // Some event have no ref + 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1)); + $r++; + + // Customer + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="left"', + 'logo' => ($objp->fk_soc > 0 ? 'company' : ''), + 'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email), + 'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''), + ); + $r++; + + // Date creation + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($db->idate($objp->datec), 'dayhour'), + ); + $r++; + + // Statut + $ticketstat = new Ticket($this->db); + $ticketstat->fk_statut = $objp->fk_statut; + $this->info_box_contents[$i][$r] = array( + 'td' => 'align="right"', + 'text' => $ticketstat->getLibStatut(3), + ); + $r++; + + $i++; + } + + if ($num == 0) { + $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("BoxLastTicketNoRecordedTickets")); + } + } else { + dol_print_error($db); + } + } else { + $this->info_box_contents[0][0] = array('td' => '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 + * @param int $nooutput No print, only return string + * @return string + */ + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index dc20e9b9665..895f411e3d6 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -1,5 +1,4 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012 Raphaël Doursenaud @@ -83,7 +82,7 @@ class box_supplier_orders extends ModeleBoxes $sql = "SELECT s.nom as name, s.rowid as socid,"; $sql.= " s.code_client, s.code_fournisseur,"; $sql.= " s.logo,"; - $sql.= " c.ref, c.tms, c.rowid, c.date_commande,"; + $sql.= " c.rowid, c.ref, c.tms, c.date_commande,"; $sql.= " c.total_ht,"; $sql.= " c.tva as total_tva,"; $sql.= " c.total_ttc,"; @@ -110,7 +109,7 @@ class box_supplier_orders extends ModeleBoxes $date=$db->jdate($objp->date_commande); $datem=$db->jdate($objp->tms); - $supplierorderstatic->id = $objp->id; + $supplierorderstatic->id = $objp->rowid; $supplierorderstatic->ref = $objp->ref; $thirdpartytmp->id = $objp->socid; diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 74f0ffc9d9d..61af58a4b8b 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -261,17 +261,17 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" { $sublink=''; if (! empty($head['sublink'])) $sublink.= ''; - if (! empty($head['subpicto'])) $sublink.= img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"'); + if (! empty($head['subpicto'])) $sublink.= img_picto($head['subtext'], $head['subpicto'], 'class="opacitymedium '.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"'); if (! empty($head['sublink'])) $sublink.= ''; $out.= ''; $out.=$sublink; // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object - $out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone cursormove"'); - $out.= img_picto($langs->trans("CloseBox",$this->box_id),'close_title','class="boxclose cursorpointer" rel="x:y" id="imgclose'.$this->box_id.'"'); + $out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="opacitymedium boxhandle hideonsmartphone cursormove"'); + $out.= img_picto($langs->trans("CloseBox",$this->box_id),'close_title','class="opacitymedium boxclose cursorpointer" rel="x:y" id="imgclose'.$this->box_id.'"'); $label=$head['text']; //if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')'; - if (! empty($head['graph'])) $label.=' '; + if (! empty($head['graph'])) $label.=' '; $out.= ''; $out.= ''; } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 4a9a49c1484..f4bbe992590 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -80,14 +80,16 @@ class CMailFile var $atleastoneimage=0; // at least one image file with file=xxx.ext into content (TODO Debug this. How can this case be tested. Remove if not used). var $html_images=array(); var $images_encoded=array(); - var $image_types = array('gif' => 'image/gif', - 'jpg' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'bmp' => 'image/bmp', - 'png' => 'image/png', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff'); + var $image_types = array( + 'gif' => 'image/gif', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'bmp' => 'image/bmp', + 'png' => 'image/png', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + ); /** @@ -211,12 +213,15 @@ class CMailFile } // Define if there is at least one file - foreach ($filename_list as $i => $val) + if (is_array($filename_list)) { - if ($filename_list[$i]) + foreach ($filename_list as $i => $val) { - $this->atleastonefile=1; - dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG); + if ($filename_list[$i]) + { + $this->atleastonefile=1; + dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG); + } } } @@ -338,71 +343,39 @@ class CMailFile $this->smtps=$smtps; } - // TODO not stable, in progress - else if ($this->sendmode == 'phpmailer') - { - // Use PHPMailer library - // ------------------------------------------ - - require_once DOL_DOCUMENT_ROOT.'/includes/phpmailer/class.phpmailer.php'; - $this->phpmailer = new PHPMailer(); - $this->phpmailer->CharSet = $conf->file->character_set_client; - - $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($replyto,0,1)); - // TODO Add trackid into smtp header - // TODO if (! empty($moreinheader)) ... - - if (! empty($this->html)) - { - if (!empty($css)) - { - $this->css = $css; - $this->buildCSS(); - } - $msg = $this->html; - $msg = $this->checkIfHTML($msg); - } - - if ($this->msgishtml) $smtps->setBodyContent($msg,'html'); - else $smtps->setBodyContent($msg,'plain'); - - if ($this->atleastoneimage) - { - foreach ($this->images_encoded as $img) - { - $smtps->setImageInline($img['image_encoded'],$img['name'],$img['content_type'],$img['cid']); - } - } - - if ($this->atleastonefile) - { - foreach ($filename_list as $i => $val) - { - $content=file_get_contents($filename_list[$i]); - $smtps->setAttachment($content,$mimefilename_list[$i],$mimetype_list[$i]); - } - } - - $this->phpmailer->setCC($addr_cc); - $this->phpmailer->setBCC($addr_bcc); - $this->phpmailer->setErrorsTo($errors_to); - $this->phpmailer->setDeliveryReceipt($deliveryreceipt); - } else if ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library // ------------------------------------------ - $host = dol_getprefix('email'); + $host = dol_getprefix('email'); + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php'; + + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailParser.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailLexer.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailValidator.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Warning/Warning.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Parser/Parser.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Parser/DomainPart.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Parser/LocalPart.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Validation/EmailValidation.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Validation/RFCValidation.php'; + + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/classes/Swift/InputByteStream.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/classes/Swift/Signer.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php'; + //require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/classes/Swift/SignedMessage.php'; require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php'; // Create the message - $this->message = Swift_Message::newInstance(); - - // Adding a trackid header to a message + //$this->message = Swift_Message::newInstance(); + $this->message = new Swift_Message(); + //$this->message = new Swift_SignedMessage(); + // Adding a trackid header to a message $headers = $this->message->getHeaders(); $headers->addTextHeader('X-Dolibarr-TRACKID', $trackid); $headerID = time() . '.swiftmailer-dolibarr-' . $trackid . '@' . $host; @@ -416,12 +389,30 @@ class CMailFile // Set the From address with an associative array //$this->message->setFrom(array('john@doe.com' => 'John Doe')); - if (! empty($from)) $this->message->setFrom($this->getArrayAddress($from)); + if (! empty($from)) { + try { + $this->message->setFrom($this->getArrayAddress($from)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } // Set the To addresses with an associative array - if (! empty($to)) $this->message->setTo($this->getArrayAddress($to)); + if (! empty($to)) { + try { + $this->message->setTo($this->getArrayAddress($to)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } - if (! empty($replyto)) $this->message->SetReplyTo($this->getArrayAddress($replyto)); + if (! empty($replyto)) { + try { + $this->message->SetReplyTo($this->getArrayAddress($replyto)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } $this->message->setCharSet($conf->file->character_set_client); @@ -452,11 +443,11 @@ class CMailFile if ($this->msgishtml) { $this->message->setBody($msg,'text/html'); // And optionally an alternative body - //$this->message->addPart('Here is the message itself', 'text/plain'); + $this->message->addPart(html_entity_decode(strip_tags($msg)), 'text/plain'); } else { $this->message->setBody($msg,'text/plain'); // And optionally an alternative body - //$this->message->addPart('Here is the message itself', 'text/html'); + $this->message->addPart($msg, 'text/html'); } if ($this->atleastonefile) @@ -494,7 +485,7 @@ class CMailFile global $conf,$db,$langs; $errorlevel=error_reporting(); - error_reporting($errorlevel ^ E_WARNING); // Desactive warnings + //error_reporting($errorlevel ^ E_WARNING); // Desactive warnings $res=false; @@ -745,21 +736,30 @@ class CMailFile if (empty($conf->global->$keyforsmtpport)) $conf->global->$keyforsmtpport=ini_get('smtp_port'); // If we use SSL/TLS - $server=$conf->global->$keyforsmtpserver; - $secure=''; + $server = $conf->global->$keyforsmtpserver; + $secure = ''; if (! empty($conf->global->$keyfortls) && function_exists('openssl_open')) $secure='ssl'; if (! empty($conf->global->$keyforstarttls) && function_exists('openssl_open')) $secure='tls'; - $this->transport = Swift_SmtpTransport::newInstance($server, $conf->global->$keyforsmtpport, $secure); + $this->transport = new Swift_SmtpTransport($server, $conf->global->$keyforsmtpport, $secure); if (! empty($conf->global->$keyforsmtpid)) $this->transport->setUsername($conf->global->$keyforsmtpid); if (! empty($conf->global->$keyforsmtppw)) $this->transport->setPassword($conf->global->$keyforsmtppw); //$smtps->_msgReplyTo = 'reply@web.com'; // Create the Mailer using your created Transport - $this->mailer = Swift_Mailer::newInstance($this->transport); + $this->mailer = new Swift_Mailer($this->transport); - if (! empty($conf->global->MAIN_MAIL_DEBUG)) { + // DKIM SIGN + if ($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED) { + $privateKey = $conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; + $domainName = $conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; + $selector = $conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; + $signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector); + $this->message->attachSigner($signer->ignoreHeader('Return-Path')); + } + + if (! empty($conf->global->MAIN_MAIL_DEBUG)) { // To use the ArrayLogger $this->logger = new Swift_Plugins_Loggers_ArrayLogger(); // Or to use the Echo Logger @@ -775,11 +775,9 @@ class CMailFile if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); $res = true; - if (! empty($this->error) && ! $result) { + if (! empty($this->error) || ! $result) { dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res=false; - } else { - $this->error = sprintf ("Sent %d messages\n", $result); } } else @@ -1160,7 +1158,7 @@ class CMailFile $out.= "Content-Disposition: attachment; filename=\"".$filename_list[$i]."\"".$this->eol; $out.= "Content-Type: " . $mimetype_list[$i] . "; name=\"".$filename_list[$i]."\"".$this->eol; $out.= "Content-Transfer-Encoding: base64".$this->eol; - $out.= "Content-Description: File Attachment".$this->eol; + $out.= "Content-Description: ".$filename_list[$i].$this->eol; $out.= $this->eol; $out.= $encoded; $out.= $this->eol; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index a4ea3a70447..d3d77640540 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -44,7 +44,6 @@ abstract class CommonDocGenerator */ public function __construct($db) { $this->db = $db; - return 1; } @@ -377,7 +376,7 @@ abstract class CommonDocGenerator $array_key.'_payment_mode_code'=>$object->mode_reglement_code, $array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement), $array_key.'_payment_term_code'=>$object->cond_reglement_code, - $array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):$object->cond_reglement), + $array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):($object->cond_reglement_doc?$object->cond_reglement_doc:$object->cond_reglement)), $array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs), $array_key.'_total_vat_locale'=>(! empty($object->total_vat)?price($object->total_vat, 0, $outputlangs):price($object->total_tva, 0, $outputlangs)), diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index ac5d3869a3d..9ce569edb35 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -180,12 +180,6 @@ abstract class CommonInvoice extends CommonObject */ function getSumCreditNotesUsed($multicurrency=0) { - if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') - { - // TODO - return 0; - } - require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discountstatic=new DiscountAbsolute($this->db); @@ -602,9 +596,11 @@ abstract class CommonInvoice extends CommonObject $sqltemp = 'SELECT c.type_cdr,c.nbjour,c.decalage'; $sqltemp.= ' FROM '.MAIN_DB_PREFIX.'c_payment_term as c'; - $sqltemp.= " WHERE c.entity IN (" . getEntity('c_payment_term').")"; - if (is_numeric($cond_reglement)) $sqltemp.= " AND c.rowid=".$cond_reglement; - else $sqltemp.= " AND c.code='".$this->db->escape($cond_reglement)."'"; + if (is_numeric($cond_reglement)) $sqltemp.= " WHERE c.rowid=".$cond_reglement; + else { + $sqltemp.= " WHERE c.entity IN (".getEntity('c_payment_term').")"; + $sqltemp.= " AND c.code='".$this->db->escape($cond_reglement)."'"; + } dol_syslog(get_class($this).'::calculate_date_lim_reglement', LOG_DEBUG); $resqltemp=$this->db->query($sqltemp); @@ -680,7 +676,7 @@ abstract class CommonInvoiceLine extends CommonObjectLine { /** * Quantity - * @var int + * @var double */ public $qty; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8abac10fc11..f3e34486f9e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel - * Copyright (C) 2011-2014 Philippe Grand + * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2012 Cedric Salvador @@ -13,6 +13,7 @@ * Copyright (C) 2016 Bahfir abbes * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017 Nicolas ZABOURI + * Copyright (C) 2017 Rui Strecht * Copyright (C) 2018 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -197,7 +198,32 @@ abstract class CommonObject * @var string * @see getFullAddress(), isInEEC(), country */ - public $country_code; + public $country_code; + /** + * @var string + * @see getFullAddress() + */ + public $state; + /** + * @var int + * @see getFullAddress(), state + */ + public $state_id; + /** + * @var string + * @see getFullAddress(), state + */ + public $state_code; + /** + * @var string + * @see getFullAddress(), region + */ + public $region; + /** + * @var string + * @see getFullAddress(), region + */ + public $region_code; /** * @var int @@ -422,9 +448,10 @@ abstract class CommonObject * * @param int $withcountry 1=Add country into address string * @param string $sep Separator to use to build string + * @param int $withregion 1=Add region into address string * @return string Full address string */ - function getFullAddress($withcountry=0,$sep="\n") + function getFullAddress($withcountry=0, $sep="\n", $withregion=0) { if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country))) { @@ -434,6 +461,16 @@ abstract class CommonObject $this->country =$tmparray['label']; } + if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_cpde))) + { + require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php'; + $tmparray=getState($this->state_id,'all',0,1); + $this->state_code =$tmparray['code']; + $this->state =$tmparray['label']; + $this->region_code =$tmparray['region_code']; + $this->region =$tmparray['region']; + } + return dol_format_address($this, $withcountry, $sep); } @@ -471,7 +508,7 @@ abstract class CommonObject $out=''; $outdone=0; - $coords = $this->getFullAddress(1,', '); + $coords = $this->getFullAddress(1,', ',$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); if ($coords) { if (! empty($conf->use_javascript_ajax)) @@ -489,7 +526,12 @@ abstract class CommonObject if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress && empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { - $out.=($outdone?' - ':'').$this->state; + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { + $out.=($outdone?' - ':'').$this->region.' - '.$this->state; + } + else { + $out.=($outdone?' - ':'').$this->state; + } $outdone++; } @@ -557,7 +599,7 @@ abstract class CommonObject if (empty($this->last_main_doc)) { - return ''; // No known last doc + return ''; // No way to known which document name to use } include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; @@ -675,7 +717,7 @@ abstract class CommonObject } else { - // On recherche id type_contact + // We look for id type_contact $sql = "SELECT tc.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql.= " WHERE tc.element='".$this->db->escape($this->element)."'"; @@ -693,13 +735,13 @@ abstract class CommonObject if ($id_type_contact == 0) { $this->error='CODE_NOT_VALID_FOR_THIS_ELEMENT'; - dol_syslog("CODE_NOT_VALID_FOR_THIS_ELEMENT"); + dol_syslog("CODE_NOT_VALID_FOR_THIS_ELEMENT: Code type of contact '".$type_contact."' does not exists or is not active for element ".$this->element.", we can ignore it"); return -3; } $datecreate = dol_now(); - // Socpeople must have already been added by some a trigger, then we have to check it to avoid DB_ERROR_RECORD_ALREADY_EXISTS error + // Socpeople must have already been added by some trigger, then we have to check it to avoid DB_ERROR_RECORD_ALREADY_EXISTS error $TListeContacts=$this->liste_contact(-1, $source); $already_added=false; if(!empty($TListeContacts)) { @@ -715,7 +757,7 @@ abstract class CommonObject $this->db->begin(); - // Insertion dans la base + // Insert into database $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact"; $sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) "; $sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ; @@ -790,7 +832,7 @@ abstract class CommonObject */ function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0) { - // Insertion dans la base + // Insert into database $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set"; $sql.= " statut = ".$statut; if ($type_contact_id) $sql.= ", fk_c_type_contact = '".$type_contact_id ."'"; @@ -1074,7 +1116,7 @@ abstract class CommonObject $sql.= " WHERE ec.element_id = ".$id; $sql.= " AND ec.fk_socpeople = c.rowid"; if ($source == 'internal') $sql.= " AND c.entity IN (0,".$conf->entity.")"; - if ($source == 'external') $sql.= " AND c.entity IN (".getEntity('societe').")"; + if ($source == 'external') $sql.= " AND c.entity IN (".getEntity('socpeople').")"; $sql.= " AND ec.fk_c_type_contact = tc.rowid"; $sql.= " AND tc.element = '".$element."'"; $sql.= " AND tc.source = '".$source."'"; @@ -1366,18 +1408,19 @@ abstract class CommonObject * Setter generic. Update a specific field into database. * Warning: Trigger is run only if param trigkey is provided. * - * @param string $field Field to update - * @param mixed $value New value - * @param string $table To force other table element or element line (should not be used) - * @param int $id To force other object id (should not be used) - * @param string $format Data format ('text', 'date'). 'text' is used if not defined - * @param string $id_field To force rowid field name. 'rowid' is used if not defined - * @param User|string $fuser Update the user of last update field with this user. If not provided, current user is used except if value is 'none' - * @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY') - * @return int <0 if KO, >0 if OK + * @param string $field Field to update + * @param mixed $value New value + * @param string $table To force other table element or element line (should not be used) + * @param int $id To force other object id (should not be used) + * @param string $format Data format ('text', 'date'). 'text' is used if not defined + * @param string $id_field To force rowid field name. 'rowid' is used if not defined + * @param User|string $fuser Update the user of last update field with this user. If not provided, current user is used except if value is 'none' + * @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY') + * @param string $fk_user_field Name of field to save user id making change + * @return int <0 if KO, >0 if OK * @see updateExtraField */ - function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='') + function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='', $fk_user_field='fk_user_modif') { global $user,$langs,$conf; @@ -1392,13 +1435,20 @@ abstract class CommonObject // Special case if ($table == 'product' && $field == 'note_private') $field='note'; + if (in_array($table, array('actioncomm', 'adherent', 'advtargetemailing', 'cronjob', 'establishment'))) $fk_user_field = 'fk_user_mod'; $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; + if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'"; else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value); else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null"); - if (! empty($fuser) && is_object($fuser)) $sql.=", fk_user_modif = ".$fuser->id; - elseif (empty($fuser) || $fuser != 'none') $sql.=", fk_user_modif = ".$user->id; + + if ($fk_user_field) + { + if (! empty($fuser) && is_object($fuser)) $sql.=", ".$fk_user_field." = ".$fuser->id; + elseif (empty($fuser) || $fuser != 'none') $sql.=", ".$fk_user_field." = ".$user->id; + } + $sql.= " WHERE ".$id_field." = ".$id; dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG); @@ -1407,7 +1457,16 @@ abstract class CommonObject { if ($trigkey) { - $result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors + // call trigger with updated object values + if (empty($this->fields) && method_exists($this, 'fetch')) + { + $result = $this->fetch($id); + } + else + { + $result = $this->fetchCommon($id); + } + if ($result >= 0) $result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors if ($result < 0) $error++; } @@ -1528,11 +1587,11 @@ abstract class CommonObject /** - * Return list of id of contacts of project + * Return list of id of contacts of object * * @param string $source Source of contact: external (llx_socpeople) or internal (llx_user) or thirdparty (llx_societe) * @return array Array of id of contacts (if source=external or internal) - * Array of id of third parties with at least one contact on project (if source=thirdparty) + * Array of id of third parties with at least one contact on object (if source=thirdparty) */ function getListContactId($source='external') { @@ -1707,22 +1766,50 @@ abstract class CommonObject 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->description?$line->description:$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, $line->multicurrency_subprice); + $this->updateline( + $line->id, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, + ($line->description?$line->description:$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, $line->multicurrency_subprice + ); break; case 'commande': - $this->updateline($line->id, ($line->description?$line->description:$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, $line->multicurrency_subprice); + $this->updateline( + $line->id, ($line->description?$line->description:$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, $line->multicurrency_subprice + ); break; case 'facture': - $this->updateline($line->id, ($line->description?$line->description:$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, $line->multicurrency_subprice); + $this->updateline( + $line->id, ($line->description?$line->description:$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, $line->multicurrency_subprice + ); break; case 'supplier_proposal': - $this->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, ($line->description?$line->description:$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->array_options, $line->ref_fourn, $line->multicurrency_subprice); + $this->updateline( + $line->id, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, + ($line->description?$line->description:$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->array_options, + $line->ref_fourn, $line->multicurrency_subprice + ); break; case 'order_supplier': - $this->updateline($line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, false, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); + $this->updateline( + $line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->qty, $line->remise_percent, + $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, false, + $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice + ); break; case 'invoice_supplier': - $this->updateline($line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->qty, 0, 'HT', $line->info_bits, $line->product_type, $line->remise_percent, false, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); + $this->updateline( + $line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->tva_tx, $line->localtax1_tx, + $line->localtax2_tx, $line->qty, 0, 'HT', $line->info_bits, $line->product_type, $line->remise_percent, false, + $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice + ); break; default: dol_syslog(get_class($this).'::setMulticurrencyRate no updateline defined', LOG_DEBUG); @@ -2395,11 +2482,13 @@ abstract class CommonObject if (! $this->table_element) { + $this->error='update_note was called on objet with property table_element not defined'; dol_syslog(get_class($this)."::update_note was called on objet with property table_element not defined", LOG_ERR); return -1; } if (! in_array($suffix,array('','_public','_private'))) { + $this->error='update_note Parameter suffix must be empty, \'_private\' or \'_public\''; dol_syslog(get_class($this)."::update_note Parameter suffix must be empty, '_private' or '_public'", LOG_ERR); return -2; } @@ -2608,7 +2697,7 @@ abstract class CommonObject $this->multicurrency_total_ttc += isset($this->revenuestamp)?($this->revenuestamp * $multicurrency_tx):0; // Situations totals - if ($this->situation_cycle_ref && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits')) + if ($this->situation_cycle_ref && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE ) { $prev_sits = $this->get_prev_sits(); @@ -2652,7 +2741,7 @@ abstract class CommonObject $sql .= ", multicurrency_total_ttc='".price2num($this->multicurrency_total_ttc, 'MT', 1)."'"; $sql .= ' WHERE rowid = '.$this->id; - //print "xx".$sql; + dol_syslog(get_class($this)."::update_price", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) @@ -2738,11 +2827,12 @@ abstract class CommonObject * @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 object that differs from source. 1=Include also link to objects of same type. - * @return int <0 if KO, >0 if OK + * @param int $alsosametype 0=Return only links to object that differs from source. 1=Include also link to objects of same type. + * @param string $orderby SQL 'ORDER BY' clause + * @return int <0 if KO, >0 if OK * @see add_object_linked, updateObjectLinked, deleteObjectLinked */ - function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1) + function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1,$orderby='sourcetype') { global $conf; @@ -2798,8 +2888,7 @@ abstract class CommonObject $sql.= "(fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."')"; $sql.= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$targettype."')"; } - $sql .= ' ORDER BY sourcetype'; - //print $sql; + $sql .= ' ORDER BY '.$orderby; dol_syslog(get_class($this)."::fetchObjectLink", LOG_DEBUG); $resql = $this->db->query($sql); @@ -3044,9 +3133,10 @@ abstract class CommonObject * @param int $status Status to set * @param int $elementId Id of element to force (use this->id by default) * @param string $elementType Type of element to force (use this->table_element by default) + * @param string $trigkey Trigger key to use for trigger * @return int <0 if KO, >0 if OK */ - function setStatut($status,$elementId=null,$elementType='') + function setStatut($status, $elementId=null, $elementType='', $trigkey='') { global $user,$langs,$conf; @@ -3058,6 +3148,7 @@ abstract class CommonObject $this->db->begin(); $fieldstatus="fk_statut"; + if ($elementTable == 'facture_rec') $fieldstatus="suspended"; if ($elementTable == 'mailing') $fieldstatus="statut"; if ($elementTable == 'cronjob') $fieldstatus="status"; if ($elementTable == 'user') $fieldstatus="statut"; @@ -3075,13 +3166,16 @@ abstract class CommonObject { $error = 0; - $trigkey=''; - if ($this->element == 'supplier_proposal' && $status == 2) $trigkey='SUPPLIER_PROPOSAL_SIGN'; // 2 = SupplierProposal::STATUS_SIGNED. Can't use constant into this generic class - if ($this->element == 'supplier_proposal' && $status == 3) $trigkey='SUPPLIER_PROPOSAL_REFUSE'; // 3 = SupplierProposal::STATUS_REFUSED. Can't use constant into this generic class - if ($this->element == 'supplier_proposal' && $status == 4) $trigkey='SUPPLIER_PROPOSAL_CLOSE'; // 4 = SupplierProposal::STATUS_CLOSED. Can't use constant into this generic class - if ($this->element == 'fichinter' && $status == 3) $trigkey='FICHINTER_CLASSIFY_DONE'; - if ($this->element == 'fichinter' && $status == 2) $trigkey='FICHINTER_CLASSIFY_BILLED'; - if ($this->element == 'fichinter' && $status == 1) $trigkey='FICHINTER_CLASSIFY_UNBILLED'; + // Try autoset of trigkey + if (empty($trigkey)) + { + if ($this->element == 'supplier_proposal' && $status == 2) $trigkey='SUPPLIER_PROPOSAL_SIGN'; // 2 = SupplierProposal::STATUS_SIGNED. Can't use constant into this generic class + if ($this->element == 'supplier_proposal' && $status == 3) $trigkey='SUPPLIER_PROPOSAL_REFUSE'; // 3 = SupplierProposal::STATUS_REFUSED. Can't use constant into this generic class + if ($this->element == 'supplier_proposal' && $status == 4) $trigkey='SUPPLIER_PROPOSAL_CLOSE'; // 4 = SupplierProposal::STATUS_CLOSED. Can't use constant into this generic class + if ($this->element == 'fichinter' && $status == 3) $trigkey='FICHINTER_CLASSIFY_DONE'; + if ($this->element == 'fichinter' && $status == 2) $trigkey='FICHINTER_CLASSIFY_BILLED'; + if ($this->element == 'fichinter' && $status == 1) $trigkey='FICHINTER_CLASSIFY_UNBILLED'; + } if ($trigkey) { @@ -3523,19 +3617,6 @@ abstract class CommonObject } - /** - * Return if a country is inside the EEC (European Economic Community) - * @deprecated Use function isInEEC function instead - * - * @return boolean true = country inside EEC, false = country outside EEC - */ - function isInEEC() - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - return isInEEC($this); - } - - // -------------------- // TODO: All functions here must be redesigned and moved as they are not business functions but output functions // -------------------- @@ -3550,12 +3631,12 @@ abstract class CommonObject * @param Societe $buyer Object thirdparty who buy * @return void */ - function formAddObjectLine($dateSelector,$seller,$buyer) + function formAddObjectLine($dateSelector, $seller, $buyer) { global $conf,$user,$langs,$object,$hookmanager; global $form,$bcnd,$var; - //Line extrafield + // Line extrafield require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafieldsline = new ExtraFields($this->db); $extralabelslines=$extrafieldsline->fetch_name_optionals_label($this->table_element_line); @@ -3614,6 +3695,8 @@ abstract class CommonObject $reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { + print "\n"; + print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print ' '; @@ -3633,7 +3716,7 @@ abstract class CommonObject print ''.$langs->trans('PriceUHT').''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''; + if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''; if ($inputalsopricewithtax) print ''.$langs->trans('PriceUTTC').''; @@ -3672,7 +3755,7 @@ abstract class CommonObject print ''.$langs->trans('TotalHTShort').''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''; + if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''; if ($outputalsopricetotalwithtax) print ''.$langs->trans('TotalTTCShort').''; @@ -3682,12 +3765,22 @@ abstract class CommonObject print ''; + if($action == 'selectlines') + { + print ''; + print ''; + print ''; + print ''; + } + print "\n"; + print "\n"; } $var = true; $i = 0; + print "\n"; foreach ($this->lines as $line) { //Line extrafield @@ -3715,6 +3808,7 @@ abstract class CommonObject $i++; } + print "\n"; } /** @@ -3871,23 +3965,26 @@ abstract class CommonObject $var = true; $i = 0; - foreach ($this->lines as $line) + if (! empty($this->lines)) { - if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) + foreach ($this->lines as $line) { - if (empty($line->fk_parent_line)) + if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) { - $parameters=array('line'=>$line,'var'=>$var,'i'=>$i); - $action=''; - $hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($line->fk_parent_line)) + { + $parameters=array('line'=>$line,'var'=>$var,'i'=>$i); + $action=''; + $hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + } + } + else + { + $this->printOriginLine($line, $var, $restrictlist); } - } - else - { - $this->printOriginLine($line, $var, $restrictlist); - } - $i++; + $i++; + } } } @@ -3984,6 +4081,12 @@ abstract class CommonObject $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessReceived",$discount->getNomUrl(0)); } + elseif ($line->desc == '(EXCESS PAID)') + { + $discount=new DiscountAbsolute($this->db); + $discount->fetch($line->fk_remise_except); + $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessPaid",$discount->getNomUrl(0)); + } else { $this->tpl['description'] = dol_trunc($line->desc,60); @@ -4290,8 +4393,10 @@ abstract class CommonObject if ($useonlinesignature) $setsharekey=true; if (! empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; } - if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; - if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; + if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; + if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; + if ($this->element == 'bank_account' && ! empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; + if ($setsharekey) { if (empty($ecmfile->share)) // Because object not found or share not set yet @@ -4324,6 +4429,9 @@ abstract class CommonObject $ecmfile->gen_or_uploaded = 'generated'; $ecmfile->description = ''; // indexed content $ecmfile->keyword = ''; // keyword content + $ecmfile->src_object_type = $this->table_element; + $ecmfile->src_object_id = $this->id; + $result = $ecmfile->create($user); if ($result < 0) { @@ -4500,6 +4608,8 @@ abstract class CommonObject return 0; } + $this->array_options=array(); + if (! is_array($optionsArray)) { // If $extrafields is not a known object, we initialize it. Best practice is to have $extrafields defined into card.php or list.php page. @@ -4541,7 +4651,7 @@ abstract class CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.$table_element."_extrafields"; $sql.= " WHERE fk_object = ".$rowid; - dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); + //dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); // Too verbose $resql=$this->db->query($sql); if ($resql) { @@ -4733,6 +4843,10 @@ abstract class CommonObject $new_array_options[$key] = $this->db->idate($this->array_options[$key]); break; case 'datetime': + // If data is a string instead of a timestamp, we convert it + if (! is_int($this->array_options[$key])) { + $this->array_options[$key] = strtotime($this->array_options[$key]); + } $new_array_options[$key] = $this->db->idate($this->array_options[$key]); break; case 'link': @@ -4839,14 +4953,14 @@ abstract class CommonObject } /** - * Update an exta field value for the current object. + * Update an extra field value for the current object. * Data to describe values to update are stored into $this->array_options=array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) * * @param string $key Key of the extrafield (without starting 'options_') * @param string $trigger If defined, call also the trigger (for example COMPANY_MODIFY) * @param User $userused Object user * @return int -1=error, O=did nothing, 1=OK - * @see setValueFrom + * @see setValueFrom, insertExtraFields */ function updateExtraField($key, $trigger, $userused) { @@ -4937,6 +5051,7 @@ abstract class CommonObject if ($error) { + dol_syslog(get_class($this) . "::".__METHOD__ . $this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -4957,7 +5072,7 @@ abstract class CommonObject * @param array $val Array of properties for field to show * @param string $key Key of attribute * @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value) - * @param string $moreparam To add more parametes on html input tag + * @param string $moreparam To add more parameters on html input tag * @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names) * @param string|int $showsize Value for css to define size. May also be a numeric. @@ -4985,11 +5100,11 @@ abstract class CommonObject $type = 'varchar'; // convert varchar(xx) int varchar $size = $reg[1]; } - elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar + elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) into varchar + elseif (preg_match('/double/', $type)) $type = 'double'; // convert double(xx) into double if (is_array($val['arrayofkeyval'])) $type='select'; if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) $type='link'; - //$elementtype=$this->attribute_elementtype[$key]; // seems to not be used $default=$val['default']; $computed=$val['computed']; $unique=$val['unique']; @@ -5012,7 +5127,7 @@ abstract class CommonObject else return ''; } - // Use in priorit showsize from parameters, then $val['css'] then autodefine + // Use in priority showsize from parameters, then $val['css'] then autodefine if (empty($showsize) && ! empty($val['css'])) { $showsize = $val['css']; @@ -5060,7 +5175,6 @@ abstract class CommonObject } } //var_dump($showsize.' '.$size); - if (in_array($type,array('date','datetime'))) { $tmp=explode(',',$size); @@ -5483,6 +5597,41 @@ abstract class CommonObject // If prefix is 'search_', field is used as a filter, we use a common text field. $out=''; } + elseif ($type == 'array') + { + $newval = $val; + $newval['type'] = 'varchar(256)'; + + $out=''; + + $inputs = array(); + if(! empty($value)) { + foreach($value as $option) { + $out.= ' '; + $out.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', $option, $moreparam, '', '', $showsize).'
'; + } + } + + $out.= ''; + + $newInput = ' '; + $newInput.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', '', $moreparam, '', '', $showsize).'
'; + + if(! empty($conf->use_javascript_ajax)) { + $out.= ' + '; + } + } if (!empty($hidden)) { $out=''; } @@ -5532,7 +5681,6 @@ abstract class CommonObject if (is_array($val['arrayofkeyval'])) $type='select'; if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) $type='link'; - //$elementtype=$this->attribute_elementtype[$key]; // seems to not be used $default=$val['default']; $computed=$val['computed']; $unique=$val['unique']; @@ -5607,11 +5755,19 @@ abstract class CommonObject elseif ($key == 'status' && method_exists($this, 'getLibStatut')) $value=$this->getLibStatut(3); elseif ($type == 'date') { - $value=dol_print_date($value,'day'); + if(! empty($value)) { + $value=dol_print_date($value,'day'); + } else { + $value=''; + } } elseif ($type == 'datetime') { - $value=dol_print_date($value,'dayhour'); + if(! empty($value)) { + $value=dol_print_date($value,'dayhour'); + } else { + $value=''; + } } elseif ($type == 'double') { @@ -5847,6 +6003,10 @@ abstract class CommonObject { $value=preg_replace('/./i','*',$value); } + elseif ($type == 'array') + { + $value = implode('
', $value); + } //print $type.'-'.$size; $out=$value; @@ -5858,31 +6018,45 @@ abstract class CommonObject /** * Function to show lines of extrafields with output datas * - * @param Extrafields $extrafields Extrafield Object - * @param string $mode Show output (view) or input (edit) for extrafield - * @param array $params Optional parameters - * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names) - * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names) - * - * @return string + * @param Extrafields $extrafields Extrafield Object + * @param string $mode Show output (view) or input (edit) for extrafield + * @param array $params Optional parameters + * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names) + * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names) + * @param string $onetrtd All fields in same tr td + * @return string */ - function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='') + function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0) { - global $_POST, $conf, $langs, $action; + global $db, $conf, $langs, $action, $form; + + if (! is_object($form)) $form=new Form($db); $out = ''; - if (count($extrafields->attribute_label) > 0) + if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) { $out .= "\n"; $out .= ' '; $out .= "\n"; $e = 0; - foreach($extrafields->attribute_label as $key=>$label) + foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { - if (empty($extrafields->attribute_list[$key])) continue; // 0 = Never visible field - if (($mode == 'create' || $mode == 'edit') && abs($extrafields->attribute_list[$key]) != 1 && abs($extrafields->attribute_list[$key]) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list + $enabled = 1; + if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key])) + { + $enabled = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1); + } + + $perms = 1; + if ($perms && isset($extrafields->attributes[$this->table_element]['perms'][$key])) + { + $perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1); + } + + if (($mode == 'create' || $mode == 'edit') && abs($enabled) != 1 && abs($enabled) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list + if (empty($perms)) continue; // Load language if required if (! empty($extrafields->attributes[$this->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); @@ -5913,50 +6087,64 @@ abstract class CommonObject } else { $value = $this->array_options["options_" . $key]; // No GET, no POST, no default value, so we take value of object. } + //var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value); break; } - //var_dump($value); - if ($extrafields->attribute_type[$key] == 'separate') + if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') { - $out .= $extrafields->showSeparator($key); + $out .= $extrafields->showSeparator($key, $this); } else { $csstyle=''; - $class=(!empty($extrafields->attribute_hidden[$key]) ? 'class="hideobject" ' : ''); + $class=(!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : ''); if (is_array($params) && count($params)>0) { if (array_key_exists('style',$params)) { $csstyle=$params['style']; } } - if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) + + // add html5 elements + $domData = ' data-element="extrafield"'; + $domData .= ' data-targetelement="'.$this->element.'"'; + $domData .= ' data-targetid="'.$this->id.'"'; + + $html_id = !empty($this->id) ? 'extrarow-'.$this->element.'_'.$key.'_'.$this->id : ''; + + $out .= ''; + + if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { - $out .= ''; - $colspan='0'; - } - else - { - $out .= ''; + if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; } } + + if ($action == 'selectlines') { $colspan++; } + // Convert date into timestamp format (value in memory must be a timestamp) - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key],array('date','datetime'))) { - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min",'int',3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year",'int',3)):$this->db->jdate($this->array_options['options_'.$key]); + $datenotinstring = $this->array_options['options_' . $key]; + if (! is_numeric($this->array_options['options_' . $key])) // For backward compatibility + { + $datenotinstring = $this->db->jdate($datenotinstring); + } + $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min",'int',3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year",'int',3)):$datenotinstring; } // Convert float submited string into real php numeric (value in memory must be a php numeric) - if (in_array($extrafields->attribute_type[$key],array('price','double'))) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key],array('price','double'))) { - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix,'int',3)):$this->array_options['options_'.$key]; + $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)):$this->array_options['options_'.$key]; } $labeltoshow = $langs->trans($label); - if($extrafields->attribute_required[$key]) - { - $labeltoshow = ''.$labeltoshow.''; - } - $out .= ''.$labeltoshow.''; + $out .= ''; + if (! empty($extrafields->attributes[$object->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$object->table_element]['help'][$key]); + else $out .= $labeltoshow; + $out .= ''; $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; $out .=''; @@ -6140,6 +6328,243 @@ abstract class CommonObject return $buyPrice; } + /** + * Show photos of an object (nbmax maximum), into several columns + * + * @param string $modulepart 'product', 'ticket', ... + * @param string $sdir Directory to scan (full absolute path) + * @param int $size 0=original size, 1='small' use thumbnail if possible + * @param int $nbmax Nombre maximum de photos (0=pas de max) + * @param int $nbbyrow Number of image per line or -1 to use div. Used only if size=1. + * @param int $showfilename 1=Show filename + * @param int $showaction 1=Show icon with action links (resize, delete) + * @param int $maxHeight Max height of original image when size='small' (so we can use original even if small requested). If 0, always use 'small' thumb image. + * @param int $maxWidth Max width of original image when size='small' + * @param int $nolink Do not add a href link to view enlarged imaged into a new tab + * @param int $notitle Do not add title tag on image + * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) + * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto + */ + function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0) + { + global $conf,$user,$langs; + + include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; + include_once DOL_DOCUMENT_ROOT .'/core/lib/images.lib.php'; + + $sortfield='position_name'; + $sortorder='asc'; + + $dir = $sdir . '/'; + $pdir = '/'; + if ($modulepart == 'ticket') + { + $dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/'; + $pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/'; + } + else + { + $dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/'; + $pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/'; + } + + // For backward compatibility + if ($modulepart == 'product' && ! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) + { + $dir = $sdir . '/'. get_exdir($this->id,2,0,0,$this,$modulepart) . $this->id ."/photos/"; + $pdir = '/' . get_exdir($this->id,2,0,0,$this,$modulepart) . $this->id ."/photos/"; + } + + // Defined relative dir to DOL_DATA_ROOT + $relativedir = ''; + if ($dir) + { + $relativedir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $dir); + $relativedir = preg_replace('/^[\\/]/','',$relativedir); + $relativedir = preg_replace('/[\\/]$/','',$relativedir); + } + + $dirthumb = $dir.'thumbs/'; + $pdirthumb = $pdir.'thumbs/'; + + $return =''."\n"; + $nbphoto=0; + + $filearray=dol_dir_list($dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + + /*if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs + { + $filearrayold=dol_dir_list($dirold,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=array_merge($filearray, $filearrayold); + }*/ + + completeFileArrayWithDatabaseInfo($filearray, $relativedir); + + if (count($filearray)) + { + if ($sortfield && $sortorder) + { + $filearray=dol_sort_array($filearray, $sortfield, $sortorder); + } + + foreach($filearray as $key => $val) + { + $photo=''; + $file = $val['name']; + + //if (! utf8_check($file)) $file=utf8_encode($file); // To be sure file is stored in UTF8 in memory + + //if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) + if (image_format_supported($file) >= 0) + { + $nbphoto++; + $photo = $file; + $viewfilename = $file; + + if ($size == 1 || $size == 'small') { // Format vignette + + // Find name of thumb file + $photo_vignette=basename(getImageFileNameForSize($dir.$file, '_small')); + if (! dol_is_file($dirthumb.$photo_vignette)) $photo_vignette=''; + + // Get filesize of original file + $imgarray=dol_getImageSize($dir.$photo); + + if ($nbbyrow > 0) + { + if ($nbphoto == 1) $return.= ''; + + if ($nbphoto % $nbbyrow == 1) $return.= ''; + $return.= ''; + if (($nbphoto % $nbbyrow) == 0) $return.= ''; + } + else if ($nbbyrow < 0) $return.=''; + } + + if (empty($size)) { // Format origine + $return.= ''; + + if ($showfilename) $return.= '
'.$viewfilename; + if ($showaction) + { + // Special case for product + if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) + { + // Link to resize + $return.= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; + + // Link to delete + $return.= ''; + $return.= img_delete().''; + } + } + } + + // On continue ou on arrete de boucler ? + if ($nbmax && $nbphoto >= $nbmax) break; + } + } + + if ($size==1 || $size=='small') + { + if ($nbbyrow > 0) + { + // Ferme tableau + while ($nbphoto % $nbbyrow) + { + $return.= ''; + $nbphoto++; + } + + if ($nbphoto) $return.= '
'; + } + else if ($nbbyrow < 0) $return .= '
'; + + $return.= "\n"; + + $relativefile=preg_replace('/^\//', '', $pdir.$photo); + if (empty($nolink)) + { + $urladvanced=getAdvancedPreviewUrl($modulepart, $relativefile, 0, 'entity='.$this->entity); + if ($urladvanced) $return.=''; + else $return.= ''; + } + + // Show image (width height=$maxHeight) + // Si fichier vignette disponible et image source trop grande, on utilise la vignette, sinon on utilise photo origine + $alt=$langs->transnoentitiesnoconv('File').': '.$relativefile; + $alt.=' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; + if ($notitle) $alt=''; + + if ($usesharelink) + { + if ($val['share']) + { + if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) + { + $return.= ''; + $return.= ''; + } + else { + $return.= ''; + $return.= ''; + } + } + else + { + $return.= ''; + $return.= ''; + } + } + else + { + if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) + { + $return.= ''; + $return.= ''; + } + else { + $return.= ''; + $return.= ''; + } + } + + if (empty($nolink)) $return.= ''; + $return.="\n"; + + if ($showfilename) $return.= '
'.$viewfilename; + if ($showaction) + { + $return.= '
'; + // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites + if ($photo_vignette && (image_format_supported($photo) > 0) && ($this->imgWidth > $maxWidth || $this->imgHeight > $maxHeight)) + { + $return.= ''.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; + } + // Special cas for product + if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) + { + // Link to resize + $return.= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; + + // Link to delete + $return.= ''; + $return.= img_delete().''; + } + } + $return.= "\n"; + + if ($nbbyrow > 0) + { + $return.= '
 
'; + } + } + } + + $this->nbphoto = $nbphoto; + + return $return; + } /** @@ -6174,7 +6599,6 @@ abstract class CommonObject else return false; } - /** * Function test if type is date * @@ -6197,7 +6621,7 @@ abstract class CommonObject { if(is_array($info)) { - if(isset($info['type']) && ($info['type']=='int' || $info['type']=='integer' )) return true; + if(isset($info['type']) && ($info['type']=='int' || preg_match('/^integer/i',$info['type']) ) ) return true; else return false; } else return false; @@ -6257,7 +6681,7 @@ abstract class CommonObject * * @return array */ - private function set_save_query() + protected function setSaveQuery() { global $conf; @@ -6269,7 +6693,7 @@ abstract class CommonObject { if(empty($this->{$field})) { - $queryarray[$field] = NULL; + $queryarray[$field] = null; } else { @@ -6278,7 +6702,14 @@ abstract class CommonObject } else if($this->isArray($info)) { - $queryarray[$field] = serialize($this->{$field}); + if(! empty($this->{$field})) { + if(! is_array($this->{$field})) { + $this->{$field} = array($this->{$field}); + } + $queryarray[$field] = serialize($this->{$field}); + } else { + $queryarray[$field] = null; + } } else if($this->isInt($info)) { @@ -6311,7 +6742,7 @@ abstract class CommonObject * * @param stdClass $obj Contain data of object from database */ - private function setVarsFromFetchObj(&$obj) + protected function setVarsFromFetchObj(&$obj) { foreach ($this->fields as $field => $info) { @@ -6322,9 +6753,13 @@ abstract class CommonObject } elseif($this->isArray($info)) { - $this->{$field} = @unserialize($obj->{$field}); - // Hack for data not in UTF8 - if($this->{$field } === FALSE) @unserialize(utf8_decode($obj->{$field})); + if(! empty($obj->{$field})) { + $this->{$field} = @unserialize($obj->{$field}); + // Hack for data not in UTF8 + if($this->{$field } === false) @unserialize(utf8_decode($obj->{$field})); + } else { + $this->{$field} = array(); + } } elseif($this->isInt($info)) { @@ -6356,7 +6791,7 @@ abstract class CommonObject * * @return string */ - private function get_field_list() + protected function getFieldList() { $keys = array_keys($this->fields); return implode(',', $keys); @@ -6391,7 +6826,7 @@ abstract class CommonObject $now=dol_now(); - $fieldvalues = $this->set_save_query(); + $fieldvalues = $this->setSaveQuery(); if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) $fieldvalues['date_creation']=$this->db->idate($now); if (array_key_exists('fk_user_creat', $fieldvalues) && ! ($fieldvalues['fk_user_creat'] > 0)) $fieldvalues['fk_user_creat']=$user->id; unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert. @@ -6412,7 +6847,7 @@ abstract class CommonObject if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]=''; //var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1)); - if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key])) + if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default'])) { $error++; $this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']); @@ -6475,19 +6910,23 @@ abstract class CommonObject /** * Load object in memory from the database * - * @param int $id Id object - * @param string $ref Ref - * @return int <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param string $ref Ref + * @param string $morewhere More SQL filters (' AND ...') + * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetchCommon($id, $ref = null) + public function fetchCommon($id, $ref = null, $morewhere = '') { - if (empty($id) && empty($ref)) return false; + if (empty($id) && empty($ref) && empty($morewhere)) return -1; - $sql = 'SELECT '.$this->get_field_list(); + $sql = 'SELECT '.$this->getFieldList(); $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element; - if(!empty($id)) $sql.= ' WHERE rowid = '.$id; - else $sql.= " WHERE ref = ".$this->quote($ref, $this->fields['ref']); + if (!empty($id)) $sql.= ' WHERE rowid = '.$id; + elseif (!empty($ref)) $sql.= " WHERE ref = ".$this->quote($ref, $this->fields['ref']); + else $sql.=' WHERE 1 = 1'; // usage with empty id and empty ref is very rare + if ($morewhere) $sql.= $morewhere; + $sql.=' LIMIT 1'; // This is a fetch, to be sure to get only one record $res = $this->db->query($sql); if ($res) @@ -6526,7 +6965,7 @@ abstract class CommonObject $now=dol_now(); - $fieldvalues = $this->set_save_query(); + $fieldvalues = $this->setSaveQuery(); if (array_key_exists('date_modification', $fieldvalues) && empty($fieldvalues['date_modification'])) $fieldvalues['date_modification']=$this->db->idate($now); if (array_key_exists('fk_user_modif', $fieldvalues) && ! ($fieldvalues['fk_user_modif'] > 0)) $fieldvalues['fk_user_modif']=$user->id; unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into update. @@ -6669,6 +7108,9 @@ abstract class CommonObject // TODO... } + + /* Part for comments */ + /** * Load comments linked with current task * @return boolean 1 if ok diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 8cacf7065b1..b3e5033330d 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -73,7 +73,7 @@ abstract class CommonOrderLine extends CommonObjectLine /** * Quantity - * @var int + * @var float */ public $qty; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0705d2fd60d..5d07b7f4619 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -97,7 +97,7 @@ class Conf // First level object // TODO Remove this part. $this->expedition_bon = new stdClass(); - $this->livraison_bon = new stdClass(); + $this->livraison_bon = new stdClass(); $this->fournisseur = new stdClass(); $this->product = new stdClass(); $this->service = new stdClass(); @@ -107,12 +107,13 @@ class Conf $this->propal = new stdClass(); $this->facture = new stdClass(); $this->contrat = new stdClass(); - $this->usergroup = new stdClass(); + $this->usergroup = new stdClass(); $this->adherent = new stdClass(); $this->bank = new stdClass(); $this->notification = new stdClass(); $this->mailing = new stdClass(); - $this->expensereport = new stdClass(); + $this->expensereport = new stdClass(); + $this->productbatch = new stdClass(); } @@ -346,6 +347,9 @@ class Conf $this->fournisseur->facture=new stdClass(); $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture"; $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp"; + $this->supplierproposal=new stdClass(); + $this->supplierproposal->dir_output=$rootfordata."/supplier_proposal"; + $this->supplierproposal->dir_temp=$rootfordata."/supplier_proposal/temp"; $this->fournisseur->payment=new stdClass(); $this->fournisseur->payment->dir_output =$rootfordata."/fournisseur/payment"; $this->fournisseur->payment->dir_temp =$rootfordata."/fournisseur/payment/temp"; @@ -361,6 +365,9 @@ class Conf $this->supplier_invoice->enabled=1; $this->supplier_invoice->dir_output=$rootfordata."/fournisseur/facture"; $this->supplier_invoice->dir_temp=$rootfordata."/fournisseur/facture/temp"; + $this->supplierproposal=new stdClass(); + $this->supplierproposal->dir_output=$rootfordata."/supplier_proposal"; + $this->supplierproposal->dir_temp=$rootfordata."/supplier_proposal/temp"; } } @@ -375,9 +382,17 @@ class Conf $this->service->dir_output=$rootfordata."/produit"; $this->service->dir_temp =$rootfordata."/produit/temp"; + // Module productbatch + $this->productbatch->multidir_output=array($this->entity => $rootfordata."/produitlot"); + $this->productbatch->multidir_temp =array($this->entity => $rootfordata."/produitlot/temp"); + // Module contrat - $this->contrat->dir_output=$rootfordata."/contracts"; - $this->contrat->dir_temp =$rootfordata."/contracts/temp"; + $this->contrat->multidir_output = array($this->entity => $rootfordata."/contract"); + $this->contrat->multidir_temp = array($this->entity => $rootfordata."/contract/temp"); + // For backward compatibility + $this->contrat->dir_output=$rootfordata."/contract"; + $this->contrat->dir_temp =$rootfordata."/contract/temp"; + // Module bank $this->bank->dir_output=$rootfordata."/bank"; $this->bank->dir_temp =$rootfordata."/bank/temp"; @@ -425,7 +440,7 @@ class Conf if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR'; $this->currency=$this->global->MAIN_MONNAIE; - if (empty($conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY)) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY = 30; // Less than 1 minutes to be sure + if (empty($this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY)) $this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY = 30; // Less than 1 minutes to be sure // conf->global->ACCOUNTING_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...) if (empty($this->global->ACCOUNTING_MODE)) $this->global->ACCOUNTING_MODE='RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' @@ -485,7 +500,7 @@ class Conf // 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 + 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; @@ -504,6 +519,10 @@ class Conf // Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal" if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent,blockedlog'; // '' means 'all'. Note that contact is added here as it should be a module later. + if (! empty($this->modules_parts['moduleforexternal'])) // Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list + { + foreach($this->modules_parts['moduleforexternal'] as $key=>$value) $this->global->MAIN_MODULES_FOR_EXTERNAL.=",".$key; + } // Enable select2 if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT='select2'; @@ -584,13 +603,15 @@ class Conf if (! isset($this->global->THEME_HIDE_BORDER_ON_INPUT)) $this->global->THEME_HIDE_BORDER_ON_INPUT=0; // Save inconsistent option - if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && (! isset($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $conf->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) + if (empty($this->global->AGENDA_USE_EVENT_TYPE) && (! isset($this->global->AGENDA_DEFAULT_FILTER_TYPE) || $this->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) { - $conf->global->AGENDA_DEFAULT_FILTER_TYPE='0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on. + $this->global->AGENDA_DEFAULT_FILTER_TYPE='0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on. } - $conf->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; - $conf->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; + if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1; + + $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; + $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; // For backward compatibility if (isset($this->product)) $this->produit=$this->product; diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php deleted file mode 100644 index 1d28861a44e..00000000000 --- a/htdocs/core/class/cookie.class.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 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/cookie.class.php - * \ingroup core - * \brief File of class to manage cookies - */ - - -/** - * Class to manage cookies. - * This class is used by external module multicompany but will be removed soon only and must not be used by - * - * @deprecated PHP already provide function to read/store a cookie. No need to use a dedicated class. Also storing sensitive information into cookie is forbidden, so encryption is useless. - * If a data is sensitive, it must be stored into database (if we need a long term retention) or into session. - */ -class DolCookie -{ - private $_myKey; - private $_iv; - - var $myCookie; - var $myValue; - var $myExpire; - var $myPath; - var $myDomain; - var $mySecure; - var $cookie; - - /** - * Constructor - * - * @param string $key Personnal key - * @deprecated - */ - function __construct($key = '') - { - $this->_myKey = hash('sha256', $key, TRUE); - $this->_iv = md5(md5($this->_myKey)); - $this->cookie = ""; - $this->myCookie = ""; - $this->myValue = ""; - } - - - /** - * Encrypt en create the cookie - * - * @return void - */ - private function _cryptCookie() - { - if (!empty($this->_myKey) && !empty($this->_iv)) - { - $valuecrypt = base64_encode($this->myValue); - $this->cookie = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->_myKey, $valuecrypt, MCRYPT_MODE_CBC, $this->_iv)); - } - else - { - $this->cookie = $this->myValue; - } - - setcookie($this->myCookie, $this->cookie, $this->myExpire, $this->myPath, $this->myDomain, $this->mySecure); - } - - /** - * Decrypt the cookie - * - * @return string - */ - private function _decryptCookie() - { - if (!empty($this->_myKey) && !empty($this->_iv)) - { - $this->cookie = $_COOKIE[$this->myCookie]; - $this->myValue = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->_myKey, base64_decode($this->cookie), MCRYPT_MODE_CBC, $this->_iv)); - - return(base64_decode($this->myValue)); - } - else - { - return($_COOKIE[$this->myCookie]); - } - } - - /** - * Set and create the cookie - * - * @param string $cookie Cookie name - * @param string $value Cookie value - * @param integer $expire Expiration - * @param string $path Path of cookie - * @param string $domain Domain name - * @param int $secure 0 or 1 - * @return void - */ - public function setCookie($cookie, $value, $expire=0, $path="/", $domain="", $secure=0) - { - $this->myCookie = $cookie; - $this->myValue = $value; - $this->myExpire = $expire; - $this->myPath = $path; - $this->myDomain = $domain; - $this->mySecure = $secure; - - //print 'key='.$this->myKey.' name='.$this->myCookie.' value='.$this->myValue.' expire='.$this->myExpire; - - $this->_cryptCookie(); - } - - /** - * Get the cookie - * - * @param string $cookie Cookie name - * @return string Decrypted value - */ - public function getCookie($cookie) - { - $this->myCookie = $cookie; - - $decryptValue = $this->_decryptCookie(); - - return $decryptValue; - } - -} - diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 37dedea8b6b..5cb7d3e6882 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2018 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 @@ -24,8 +24,7 @@ /** - * \class DiscountAbsolute - * \brief Class to manage absolute discounts + * Class to manage absolute discounts */ class DiscountAbsolute { @@ -34,6 +33,7 @@ class DiscountAbsolute public $id; // Id discount public $fk_soc; + public $discount_type; // 0 => customer discount, 1 => supplier discount public $amount_ht; // public $amount_tva; // public $amount_ttc; // @@ -45,6 +45,7 @@ class DiscountAbsolute public $fk_facture; // Id invoice when a discount line is used into an invoice (for credit note) public $fk_facture_source; // Id facture avoir a l'origine de la remise public $ref_facture_source; // Ref facture avoir a l'origine de la remise + public $ref_invoice_supplier_source; /** * Constructor @@ -60,33 +61,36 @@ class DiscountAbsolute /** * Load object from database into memory * - * @param int $rowid id discount to load - * @param int $fk_facture_source fk_facture_source - * @return int <0 if KO, =0 if not found, >0 if OK + * @param int $rowid id discount to load + * @param int $fk_facture_source fk_facture_source + * @param int $fk_invoice_supplier_source fk_invoice_supplier_source + * @return int <0 if KO, =0 if not found, >0 if OK */ - function fetch($rowid, $fk_facture_source=0) + function fetch($rowid, $fk_facture_source=0, $fk_invoice_supplier_source=0) { global $conf; // Check parameters - if (! $rowid && ! $fk_facture_source) + if (! $rowid && ! $fk_facture_source && ! $fk_invoice_supplier_source) { $this->error='ErrorBadParameters'; return -1; } - $sql = "SELECT sr.rowid, sr.fk_soc,"; + $sql = "SELECT sr.rowid, sr.fk_soc, sr.discount_type,"; $sql.= " sr.fk_user,"; $sql.= " sr.amount_ht, sr.amount_tva, sr.amount_ttc, sr.tva_tx,"; $sql.= " sr.multicurrency_amount_ht, sr.multicurrency_amount_tva, sr.multicurrency_amount_ttc,"; - $sql.= " sr.fk_facture_line, sr.fk_facture, sr.fk_facture_source, sr.description,"; + $sql.= " sr.fk_facture_line, sr.fk_facture, sr.fk_facture_source, sr.fk_invoice_supplier_line, sr.fk_invoice_supplier, sr.fk_invoice_supplier_source, sr.description,"; $sql.= " sr.datec,"; - $sql.= " f.facnumber as ref_facture_source"; + $sql.= " f.facnumber as ref_facture_source, fsup.facnumber as ref_invoice_supplier_source"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as sr"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON sr.fk_facture_source = f.rowid"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fsup ON sr.fk_invoice_supplier_source = fsup.rowid"; $sql.= " WHERE sr.entity = " . $conf->entity; if ($rowid) $sql.= " AND sr.rowid=".$rowid; if ($fk_facture_source) $sql.= " AND sr.fk_facture_source=".$fk_facture_source; + if ($fk_invoice_supplier_source) $sql.= " AND sr.fk_invoice_supplier_source=".$fk_invoice_supplier_source; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -98,6 +102,7 @@ class DiscountAbsolute $this->id = $obj->rowid; $this->fk_soc = $obj->fk_soc; + $this->discount_type = $obj->discount_type; $this->amount_ht = $obj->amount_ht; $this->amount_tva = $obj->amount_tva; @@ -113,6 +118,10 @@ class DiscountAbsolute $this->fk_facture = $obj->fk_facture; $this->fk_facture_source = $obj->fk_facture_source; // Id avoir source $this->ref_facture_source = $obj->ref_facture_source; // Ref avoir source + $this->fk_invoice_supplier_line = $obj->fk_invoice_supplier_line; + $this->fk_invoice_supplier = $obj->fk_invoice_supplier; + $this->fk_invoice_supplier_source = $obj->fk_invoice_supplier_source; // Id avoir source + $this->ref_invoice_supplier_source = $obj->ref_invoice_supplier_source; // Ref avoir source $this->description = $obj->description; $this->datec = $this->db->jdate($obj->datec); @@ -159,13 +168,14 @@ class DiscountAbsolute // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise_except"; - $sql.= " (entity, datec, fk_soc, fk_user, description,"; + $sql.= " (entity, datec, fk_soc, discount_type, fk_user, description,"; $sql.= " amount_ht, amount_tva, amount_ttc, tva_tx,"; - $sql.= " fk_facture_source"; + $sql.= " fk_facture_source, fk_invoice_supplier_source"; $sql.= ")"; - $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".$user->id.", '".$this->db->escape($this->description)."',"; + $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".(empty($this->discount_type)?0:intval($this->discount_type)).", ".$user->id.", '".$this->db->escape($this->description)."',"; $sql.= " ".$this->amount_ht.", ".$this->amount_tva.", ".$this->amount_ttc.", ".$this->tva_tx.","; - $sql.= " ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'":"null"); + $sql.= " ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'":"null").","; + $sql.= " ".($this->fk_invoice_supplier_source ? "'".$this->db->escape($this->fk_invoice_supplier_source)."'":"null"); $sql.= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -221,14 +231,45 @@ class DiscountAbsolute } } + // Check if we can remove the discount + if ($this->fk_invoice_supplier_source) + { + $sql="SELECT COUNT(rowid) as nb"; + $sql.=" FROM ".MAIN_DB_PREFIX."societe_remise_except"; + $sql.=" WHERE (fk_invoice_supplier_line IS NOT NULL"; // Not used as absolute simple discount + $sql.=" OR fk_invoice_supplier IS NOT NULL)"; // Not used as credit note and not used as deposit + $sql.=" AND fk_invoice_supplier_source = ".$this->fk_invoice_supplier_source; + //$sql.=" AND rowid != ".$this->id; + + dol_syslog(get_class($this)."::delete Check if we can remove discount", LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($obj->nb > 0) + { + $this->error='ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; + return -2; + } + } + else + { + dol_print_error($this->db); + return -1; + } + } + $this->db->begin(); // Delete but only if not used $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except "; if ($this->fk_facture_source) $sql.= " WHERE fk_facture_source = ".$this->fk_facture_source; // Delete all lines of same serie + elseif ($this->fk_invoice_supplier_source) $sql.= " WHERE fk_invoice_supplier_source = ".$this->fk_invoice_supplier_source; // Delete all lines of same serie else $sql.= " WHERE rowid = ".$this->id; // Delete only line $sql.= " AND (fk_facture_line IS NULL"; // Not used as absolute simple discount $sql.= " AND fk_facture IS NULL)"; // Not used as credit note and not used as deposit + $sql.= " AND (fk_invoice_supplier_line IS NULL"; // Not used as absolute simple discount + $sql.= " AND fk_invoice_supplier IS NULL)"; // Not used as credit note and not used as deposit dol_syslog(get_class($this)."::delete Delete discount", LOG_DEBUG); $result=$this->db->query($sql); @@ -255,6 +296,26 @@ class DiscountAbsolute return -1; } } + elseif($this->fk_invoice_supplier_source) { + + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; + $sql.=" set paye=0, fk_statut=1"; + $sql.=" WHERE (type = 2 or type = 3) AND rowid=".$this->fk_invoice_supplier_source; + + dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); + $result=$this->db->query($sql); + if ($result) + { + $this->db->commit(); + return 1; + } + else + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } else { $this->db->commit(); @@ -295,16 +356,26 @@ class DiscountAbsolute } $sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except"; - if ($rowidline) $sql.=" SET fk_facture_line = ".$rowidline; - if ($rowidinvoice) $sql.=" SET fk_facture = ".$rowidinvoice; + if(! empty($this->discount_type)) { + if ($rowidline) $sql.=" SET fk_invoice_supplier_line = ".$rowidline; + if ($rowidinvoice) $sql.=" SET fk_invoice_supplier = ".$rowidinvoice; + } else { + if ($rowidline) $sql.=" SET fk_facture_line = ".$rowidline; + if ($rowidinvoice) $sql.=" SET fk_facture = ".$rowidinvoice; + } $sql.=" WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::link_to_invoice", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - $this->fk_facture_line=$rowidline; - $this->fk_facture=$rowidinvoice; + if(! empty($this->discount_type)) { + $this->fk_invoice_supplier_line=$rowidline; + $this->fk_invoice_supplier=$rowidinvoice; + } else { + $this->fk_facture_line=$rowidline; + $this->fk_facture=$rowidinvoice; + } return 1; } else @@ -324,7 +395,11 @@ class DiscountAbsolute function unlink_invoice() { $sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except"; - $sql.=" SET fk_facture_line = NULL, fk_facture = NULL"; + if(! empty($this->discount_type)) { + $sql.=" SET fk_invoice_supplier_line = NULL, fk_invoice_supplier = NULL"; + } else { + $sql.=" SET fk_facture_line = NULL, fk_facture = NULL"; + } $sql.=" WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::unlink_invoice", LOG_DEBUG); @@ -344,14 +419,14 @@ class DiscountAbsolute /** * Return amount (with tax) of discounts currently available for a company, user or other criteria * - * @param Societe $company Object third party for filter - * @param User $user Filtre sur un user auteur des remises - * @param string $filter Filtre autre - * @param int $maxvalue Filter on max value for discount - * @param string $mode 'customer' = discounts the customer has, 'supplier' = discount i have at this supplier + * @param Societe $company Object third party for filter + * @param User $user Filtre sur un user auteur des remises + * @param string $filter Filtre autre + * @param int $maxvalue Filter on max value for discount + * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, amount otherwise */ - function getAvailableDiscounts($company='', $user='',$filter='', $maxvalue=0, $mode='customer') + function getAvailableDiscounts($company='', $user='',$filter='', $maxvalue=0, $discount_type=0) { global $conf; @@ -359,8 +434,12 @@ class DiscountAbsolute //$sql = "SELECT rc.amount_ttc as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " WHERE rc.entity = " . $conf->entity; - if ($mode != 'supplier') $sql.= " AND (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL)"; // Available - else $sql.= " AND (rc.fk_suppler_invoice IS NULL AND rc.fk_supplier_invoice IS NULL)"; // Available + $sql.= " AND rc.discount_type=".intval($discount_type); + if (! empty($discount_type)) { + $sql.= " AND (rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_line IS NULL)"; // Available from supplier + } else { + $sql.= " AND (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL)"; // Available to customer + } if (is_object($company)) $sql.= " AND rc.fk_soc = ".$company->id; if (is_object($user)) $sql.= " AND rc.fk_user = ".$user->id; if ($filter) $sql.=' AND ('.$filter.')'; @@ -452,7 +531,7 @@ class DiscountAbsolute $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; - $sql.= ' AND (f.type = 2 OR f.type = 0)'; // Find discount coming from credit note or excess received + $sql.= ' AND (f.type = 2 OR f.type = 0)'; // Find discount coming from credit note or excess paid } else { @@ -489,10 +568,12 @@ class DiscountAbsolute $result=''; if ($option == 'invoice') { + $facid=! empty($this->discount_type)?$this->fk_invoice_supplier_source:$this->fk_facture_source; + $link=! empty($this->discount_type)?'/fourn/facture/card.php':'/compta/facture/card.php'; $label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source; - $link = ''; + $link = ''; $linkend=''; - $ref=$this->ref_facture_source; + $ref=! empty($this->discount_type)?$this->ref_invoice_supplier_source:$this->ref_facture_source; $picto='bill'; } if ($option == 'discount') { diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index aa500ab64df..860d89afea8 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -153,7 +153,7 @@ class DolEditor { global $conf,$langs; - $fullpage=False; + $fullpage=false; if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) { $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index ba7a67be3cb..f40d30f389e 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -674,7 +674,7 @@ class DolGraph $group->setPadding($paddleft, $paddright); // Width on left and right for Y axis values $group->legend->setSpace(0); $group->legend->setPadding(2,2,2,2); - $group->legend->setPosition(NULL,0.1); + $group->legend->setPosition(null, 0.1); $group->legend->setBackgroundColor($colorsemitrans); if (is_array($this->bgcolorgrid)) $group->grid->setBackgroundColor($bgcolorgrid); @@ -734,7 +734,7 @@ class DolGraph $plot->barShadow->setSize($this->SetShading); $plot->barShadow->setPosition(SHADOW_RIGHT_TOP); $plot->barShadow->setColor(new Color(160, 160, 160, 50)); - $plot->barShadow->smooth(TRUE); + $plot->barShadow->smooth(true); //$plot->setSize(1, 0.96); //$plot->setCenter(0.5, 0.52); @@ -880,10 +880,17 @@ class DolGraph $this->stringtoshow.=''; + + if ($acceptdelayedhtml) + { + $delayedhtmlcontent.=$outdelayed; + } + else + { + $out.=$outdelayed; + } + return $out; + } + /** * Show a multiselect form from an array. * @@ -5753,7 +5915,7 @@ class Form -
+